summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-05-07 15:00:30 +0000
committerRichard Purdie <richard@openedhand.com>2008-05-07 15:00:30 +0000
commit44152596bab3f875057f48dbc238603aaae4df1d (patch)
tree0a03293c5e118d54613115e4735c1d830898d030 /meta/packages
parent1b969af1b947a0c216cf17bba73fe7d07c411c98 (diff)
downloadpoky-44152596bab3f875057f48dbc238603aaae4df1d.tar.gz
jpeg: Rip out debian libtool hacks and use libtool-cross from staging. Also set tag mode to avoid issues with modern libtool
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4451 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/jpeg/jpeg-6b/debian.patch7260
-rw-r--r--meta/packages/jpeg/jpeg-6b/libtool_tweak.patch52
-rw-r--r--meta/packages/jpeg/jpeg_6b.bb10
3 files changed, 60 insertions, 7262 deletions
diff --git a/meta/packages/jpeg/jpeg-6b/debian.patch b/meta/packages/jpeg/jpeg-6b/debian.patch
index 823c8e08dc..d6ae090d47 100644
--- a/meta/packages/jpeg/jpeg-6b/debian.patch
+++ b/meta/packages/jpeg/jpeg-6b/debian.patch
@@ -41,16 +41,6 @@
41 41
42 # Initialize some other variables. 42 # Initialize some other variables.
43 subdirs= 43 subdirs=
44@@ -1559,7 +1559,8 @@
45 if test "x$LTSTATIC" = xno; then
46 disable_static="--disable-static"
47 fi
48- $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
49+ chmod a+x $srcdir/ltconfig.new
50+ $srcdir/ltconfig.new $disable_shared $disable_static $srcdir/ltmain.new.sh $host
51 fi
52
53 # Select memory manager depending on user input.
54--- jpeg-6b/makefile.cfg~libjpeg6bb-5 44--- jpeg-6b/makefile.cfg~libjpeg6bb-5
55+++ jpeg-6b/makefile.cfg 45+++ jpeg-6b/makefile.cfg
56@@ -17,7 +17,7 @@ 46@@ -17,7 +17,7 @@
@@ -1886,4237 +1876,6 @@
1886 #endif /* TRANSFORMS_SUPPORTED */ 1876 #endif /* TRANSFORMS_SUPPORTED */
1887 1877
1888 1878
1889--- jpeg-6b/config.guess~libjpeg6bb-5
1890+++ jpeg-6b/config.guess
1891@@ -1,4 +1,10 @@
1892 #! /bin/sh
1893+# autotools-dev hack (<ballombe@debian.org>, Wed, 14 Nov 2001 10:13:10 +0100)
1894+if [ -x /usr/share/misc/config.guess ]; then
1895+ /usr/share/misc/config.guess $*
1896+ exit $?
1897+fi
1898+
1899 # Attempt to guess a canonical system name.
1900 # Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
1901 #
1902--- jpeg-6b/config.sub~libjpeg6bb-5
1903+++ jpeg-6b/config.sub
1904@@ -1,4 +1,10 @@
1905 #! /bin/sh
1906+# autotools-dev hack (<ballombe@debian.org>, Wed, 14 Nov 2001 10:13:10 +0100)
1907+if [ -x /usr/share/misc/config.sub ]; then
1908+ /usr/share/misc/config.sub $*
1909+ exit $?
1910+fi
1911+
1912 # Configuration validation subroutine script, version 1.1.
1913 # Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
1914 # This file is (in principle) common to ALL GNU software.
1915--- /dev/null
1916+++ jpeg-6b/libtool.cfg
1917@@ -0,0 +1,224 @@
1918+# libtool.cfg - Libtool configuration file.
1919+# Generated automatically by ltconfig (GNU libtool 1.3.3 (1.385.2.181 1999/07/02 15:49:11))
1920+# Libtool was configured as follows, on host yellowpig:
1921+#
1922+# CC="old_CC" CFLAGS="old_CFLAGS" CPPFLAGS="old_CPPFLAGS" \
1923+# LD="old_LD" LDFLAGS="old_LDFLAGS" LIBS="old_LIBS" \
1924+# NM="old_NM" RANLIB="old_RANLIB" LN_S="old_LN_S" \
1925+# DLLTOOL="old_DLLTOOL" OBJDUMP="old_OBJDUMP" AS="old_AS" \
1926+# ./ltconfig.new ./ltmain.sh.new i386-gnu
1927+#
1928+# Compiler and other test output produced by ltconfig.new, useful for
1929+# debugging ltconfig.new, is in ./config.log if it exists.
1930+
1931+# The version of ltconfig.new that generated this script.
1932+LTCONFIG_VERSION=1.3.3
1933+
1934+# Shell to use when invoking shell scripts.
1935+SHELL=/bin/sh
1936+
1937+# Whether or not to build shared libraries.
1938+build_libtool_libs=yes
1939+
1940+# Whether or not to build static libraries.
1941+build_old_libs=yes
1942+
1943+# Whether or not to optimize for fast installation.
1944+fast_install=yes
1945+
1946+# The host system.
1947+host_alias=i386-gnu
1948+host=i386-pc-gnu
1949+
1950+# An echo program that does not interpret backslashes.
1951+echo=echo
1952+
1953+# The archiver.
1954+AR=ar
1955+
1956+# The default C compiler.
1957+CC=gcc
1958+
1959+# The linker used to build libraries.
1960+LD=/usr/bin/ld
1961+
1962+# Whether we need hard or soft links.
1963+LN_S=ln -s
1964+
1965+# A BSD-compatible nm program.
1966+NM=/usr/bin/nm -B
1967+
1968+# Used on cygwin: DLL creation program.
1969+DLLTOOL="dlltool"
1970+
1971+# Used on cygwin: object dumper.
1972+OBJDUMP="objdump"
1973+
1974+# Used on cygwin: assembler.
1975+AS="as"
1976+
1977+# The name of the directory that contains temporary libtool files.
1978+objdir=.libs
1979+
1980+# How to create reloadable object files.
1981+reload_flag= -r
1982+reload_cmds=$LD$reload_flag -o $output$reload_objs
1983+
1984+# How to pass a linker flag through the compiler.
1985+wl=-Wl,
1986+
1987+# Object file suffix (normally "o").
1988+objext="o"
1989+
1990+# Old archive suffix (normally "a").
1991+libext="a"
1992+
1993+# Executable file suffix (normally "").
1994+exeext=""
1995+
1996+# Additional compiler flags for building library objects.
1997+pic_flag= -fPIC
1998+
1999+# Does compiler simultaneously support -c and -o options?
2000+compiler_c_o=yes
2001+
2002+# Can we write directly to a .lo ?
2003+compiler_o_lo=yes
2004+
2005+# Must we lock files when doing compilation ?
2006+need_locks=no
2007+
2008+# Do we need the lib prefix for modules?
2009+need_lib_prefix=no
2010+
2011+# Do we need a version for libraries?
2012+need_version=no
2013+
2014+# Whether dlopen is supported.
2015+dlopen=unknown
2016+
2017+# Whether dlopen of programs is supported.
2018+dlopen_self=unknown
2019+
2020+# Whether dlopen of statically linked programs is supported.
2021+dlopen_self_static=unknown
2022+
2023+# Compiler flag to prevent dynamic linking.
2024+link_static_flag=-static
2025+
2026+# Compiler flag to turn off builtin functions.
2027+no_builtin_flag= -fno-builtin -fno-rtti -fno-exceptions
2028+
2029+# Compiler flag to allow reflexive dlopens.
2030+export_dynamic_flag_spec=${wl}--export-dynamic
2031+
2032+# Compiler flag to generate shared objects directly from archives.
2033+whole_archive_flag_spec=${wl}--whole-archive$convenience ${wl}--no-whole-archive
2034+
2035+# Compiler flag to generate thread-safe objects.
2036+thread_safe_flag_spec=
2037+
2038+# Library versioning type.
2039+version_type=linux
2040+
2041+# Format of library name prefix.
2042+libname_spec=lib$name
2043+
2044+# List of archive names. First name is the real one, the rest are links.
2045+# The last name is the one that the linker finds with -lNAME.
2046+library_names_spec=${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so
2047+
2048+# The coded name of the library, if different from the real name.
2049+soname_spec=${libname}${release}.so$major
2050+
2051+# Commands used to build and install an old-style archive.
2052+RANLIB=ranlib
2053+old_archive_cmds=$AR cru $oldlib$oldobjs~$RANLIB $oldlib
2054+old_postinstall_cmds=$RANLIB $oldlib~chmod 644 $oldlib
2055+old_postuninstall_cmds=
2056+
2057+# Create an old-style archive from a shared archive.
2058+old_archive_from_new_cmds=
2059+
2060+# Commands used to build and install a shared archive.
2061+archive_cmds=$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib
2062+archive_expsym_cmds=$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib
2063+postinstall_cmds=
2064+postuninstall_cmds=
2065+
2066+# Method to check whether dependent libraries are shared objects.
2067+deplibs_check_method=unknown
2068+
2069+# Command to use when deplibs_check_method == file_magic.
2070+file_magic_cmd=
2071+
2072+# Flag that allows shared libraries with undefined symbols to be built.
2073+allow_undefined_flag=
2074+
2075+# Flag that forces no undefined symbols.
2076+no_undefined_flag=
2077+
2078+# Commands used to finish a libtool library installation in a directory.
2079+finish_cmds=
2080+
2081+# Same as above, but a single script fragment to be evaled but not shown.
2082+finish_eval=
2083+
2084+# Take the output of nm and produce a listing of raw symbols and C names.
2085+global_symbol_pipe=sed -n -e 's/^.*[ ]\([ABCDGISTW]\)[ ][ ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p'
2086+
2087+# Transform the output of nm in a proper C declaration
2088+global_symbol_to_cdecl=sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'
2089+
2090+# This is the shared library runtime path variable.
2091+runpath_var=LD_RUN_PATH
2092+
2093+# This is the shared library path variable.
2094+shlibpath_var=LD_LIBRARY_PATH
2095+
2096+# Is shlibpath searched before the hard-coded library search path?
2097+shlibpath_overrides_runpath=unknown
2098+
2099+# How to hardcode a shared library path into an executable.
2100+hardcode_action=immediate
2101+
2102+# Flag to hardcode $libdir into a binary during linking.
2103+# This must work even if $libdir does not exist.
2104+hardcode_libdir_flag_spec=${wl}--rpath ${wl}$libdir
2105+
2106+# Whether we need a single -rpath flag with a separated argument.
2107+hardcode_libdir_separator=
2108+
2109+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2110+# resulting binary.
2111+hardcode_direct=no
2112+
2113+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2114+# resulting binary.
2115+hardcode_minus_L=no
2116+
2117+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2118+# the resulting binary.
2119+hardcode_shlibpath_var=unsupported
2120+
2121+# Compile-time system search path for libraries
2122+sys_lib_search_path_spec=/lib /usr/lib /usr/local/lib
2123+
2124+# Run-time system search path for libraries
2125+sys_lib_dlsearch_path_spec=/lib /usr/lib
2126+
2127+# Fix the shell variable $srcfile for the compiler.
2128+fix_srcfile_path=""
2129+
2130+# Set to yes if exported symbols are required.
2131+always_export_symbols=no
2132+
2133+# The commands to list exported symbols.
2134+export_symbols_cmds=$NM $libobjs $convenience | $global_symbol_pipe | sed 's/.* //' | sort | uniq > $export_symbols
2135+
2136+# Symbols that should not be listed in the preloaded symbols.
2137+exclude_expsyms=_GLOBAL_OFFSET_TABLE_
2138+
2139+# Symbols that must always be exported.
2140+include_expsyms=
2141+
2142--- /dev/null
2143+++ jpeg-6b/ltmain.new.sh
2144@@ -0,0 +1,3975 @@
2145+# ltmain.sh - Provide generalized library-building support services.
2146+# NOTE: Changing this file will not affect anything until you rerun ltconfig.
2147+#
2148+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
2149+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2150+#
2151+# This program is free software; you can redistribute it and/or modify
2152+# it under the terms of the GNU General Public License as published by
2153+# the Free Software Foundation; either version 2 of the License, or
2154+# (at your option) any later version.
2155+#
2156+# This program is distributed in the hope that it will be useful, but
2157+# WITHOUT ANY WARRANTY; without even the implied warranty of
2158+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2159+# General Public License for more details.
2160+#
2161+# You should have received a copy of the GNU General Public License
2162+# along with this program; if not, write to the Free Software
2163+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2164+#
2165+# As a special exception to the GNU General Public License, if you
2166+# distribute this file as part of a program that contains a
2167+# configuration script generated by Autoconf, you may include it under
2168+# the same distribution terms that you use for the rest of that program.
2169+
2170+# Check that we have a working $echo.
2171+if test "X$1" = X--no-reexec; then
2172+ # Discard the --no-reexec flag, and continue.
2173+ shift
2174+elif test "X$1" = X--fallback-echo; then
2175+ # Avoid inline document here, it may be left over
2176+ :
2177+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
2178+ # Yippee, $echo works!
2179+ :
2180+else
2181+ # Restart under the correct shell, and then maybe $echo will work.
2182+ exec $SHELL "$0" --no-reexec ${1+"$@"}
2183+fi
2184+
2185+if test "X$1" = X--fallback-echo; then
2186+ # used as fallback echo
2187+ shift
2188+ cat <<EOF
2189+$*
2190+EOF
2191+ exit 0
2192+fi
2193+
2194+# The name of this program.
2195+progname=`$echo "$0" | sed 's%^.*/%%'`
2196+modename="$progname"
2197+
2198+# Constants.
2199+PROGRAM=ltmain.sh
2200+PACKAGE=libtool
2201+VERSION=1.3.3
2202+TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
2203+
2204+default_mode=
2205+help="Try \`$progname --help' for more information."
2206+magic="%%%MAGIC variable%%%"
2207+mkdir="mkdir"
2208+mv="mv -f"
2209+rm="rm -f"
2210+
2211+# Sed substitution that helps us do robust quoting. It backslashifies
2212+# metacharacters that are still active within double-quoted strings.
2213+Xsed='sed -e 1s/^X//'
2214+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
2215+SP2NL='tr \040 \012'
2216+NL2SP='tr \015\012 \040\040'
2217+
2218+# NLS nuisances.
2219+# Only set LANG and LC_ALL to C if already set.
2220+# These must not be set unconditionally because not all systems understand
2221+# e.g. LANG=C (notably SCO).
2222+# We save the old values to restore during execute mode.
2223+if test "${LC_ALL+set}" = set; then
2224+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
2225+fi
2226+if test "${LANG+set}" = set; then
2227+ save_LANG="$LANG"; LANG=C; export LANG
2228+fi
2229+
2230+if test "$LTCONFIG_VERSION" != "$VERSION"; then
2231+ echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
2232+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2233+ exit 1
2234+fi
2235+
2236+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
2237+ echo "$modename: not configured to build any kind of library" 1>&2
2238+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2239+ exit 1
2240+fi
2241+
2242+# Global variables.
2243+mode=$default_mode
2244+nonopt=
2245+prev=
2246+prevopt=
2247+run=
2248+show="$echo"
2249+show_help=
2250+execute_dlfiles=
2251+lo2o="s/\\.lo\$/.${objext}/"
2252+o2lo="s/\\.${objext}\$/.lo/"
2253+
2254+# Parse our command line options once, thoroughly.
2255+while test $# -gt 0
2256+do
2257+ arg="$1"
2258+ shift
2259+
2260+ case "$arg" in
2261+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
2262+ *) optarg= ;;
2263+ esac
2264+
2265+ # If the previous option needs an argument, assign it.
2266+ if test -n "$prev"; then
2267+ case "$prev" in
2268+ execute_dlfiles)
2269+ eval "$prev=\"\$$prev \$arg\""
2270+ ;;
2271+ *)
2272+ eval "$prev=\$arg"
2273+ ;;
2274+ esac
2275+
2276+ prev=
2277+ prevopt=
2278+ continue
2279+ fi
2280+
2281+ # Have we seen a non-optional argument yet?
2282+ case "$arg" in
2283+ --help)
2284+ show_help=yes
2285+ ;;
2286+
2287+ --version)
2288+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
2289+ exit 0
2290+ ;;
2291+
2292+ --config)
2293+ sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
2294+ exit 0
2295+ ;;
2296+
2297+ --debug)
2298+ echo "$progname: enabling shell trace mode"
2299+ set -x
2300+ ;;
2301+
2302+ --dry-run | -n)
2303+ run=:
2304+ ;;
2305+
2306+ --features)
2307+ echo "host: $host"
2308+ if test "$build_libtool_libs" = yes; then
2309+ echo "enable shared libraries"
2310+ else
2311+ echo "disable shared libraries"
2312+ fi
2313+ if test "$build_old_libs" = yes; then
2314+ echo "enable static libraries"
2315+ else
2316+ echo "disable static libraries"
2317+ fi
2318+ exit 0
2319+ ;;
2320+
2321+ --finish) mode="finish" ;;
2322+
2323+ --mode) prevopt="--mode" prev=mode ;;
2324+ --mode=*) mode="$optarg" ;;
2325+
2326+ --quiet | --silent)
2327+ show=:
2328+ ;;
2329+
2330+ -dlopen)
2331+ prevopt="-dlopen"
2332+ prev=execute_dlfiles
2333+ ;;
2334+
2335+ -*)
2336+ $echo "$modename: unrecognized option \`$arg'" 1>&2
2337+ $echo "$help" 1>&2
2338+ exit 1
2339+ ;;
2340+
2341+ *)
2342+ nonopt="$arg"
2343+ break
2344+ ;;
2345+ esac
2346+done
2347+
2348+if test -n "$prevopt"; then
2349+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
2350+ $echo "$help" 1>&2
2351+ exit 1
2352+fi
2353+
2354+if test -z "$show_help"; then
2355+
2356+ # Infer the operation mode.
2357+ if test -z "$mode"; then
2358+ case "$nonopt" in
2359+ *cc | *++ | gcc* | *-gcc*)
2360+ mode=link
2361+ for arg
2362+ do
2363+ case "$arg" in
2364+ -c)
2365+ mode=compile
2366+ break
2367+ ;;
2368+ esac
2369+ done
2370+ ;;
2371+ *db | *dbx | *strace | *truss)
2372+ mode=execute
2373+ ;;
2374+ *install*|cp|mv)
2375+ mode=install
2376+ ;;
2377+ *rm)
2378+ mode=uninstall
2379+ ;;
2380+ *)
2381+ # If we have no mode, but dlfiles were specified, then do execute mode.
2382+ test -n "$execute_dlfiles" && mode=execute
2383+
2384+ # Just use the default operation mode.
2385+ if test -z "$mode"; then
2386+ if test -n "$nonopt"; then
2387+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
2388+ else
2389+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
2390+ fi
2391+ fi
2392+ ;;
2393+ esac
2394+ fi
2395+
2396+ # Only execute mode is allowed to have -dlopen flags.
2397+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
2398+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
2399+ $echo "$help" 1>&2
2400+ exit 1
2401+ fi
2402+
2403+ # Change the help message to a mode-specific one.
2404+ generic_help="$help"
2405+ help="Try \`$modename --help --mode=$mode' for more information."
2406+
2407+ # These modes are in order of execution frequency so that they run quickly.
2408+ case "$mode" in
2409+ # libtool compile mode
2410+ compile)
2411+ modename="$modename: compile"
2412+ # Get the compilation command and the source file.
2413+ base_compile=
2414+ lastarg=
2415+ srcfile="$nonopt"
2416+ suppress_output=
2417+
2418+ user_target=no
2419+ for arg
2420+ do
2421+ # Accept any command-line options.
2422+ case "$arg" in
2423+ -o)
2424+ if test "$user_target" != "no"; then
2425+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
2426+ exit 1
2427+ fi
2428+ user_target=next
2429+ ;;
2430+
2431+ -static)
2432+ build_old_libs=yes
2433+ continue
2434+ ;;
2435+ esac
2436+
2437+ case "$user_target" in
2438+ next)
2439+ # The next one is the -o target name
2440+ user_target=yes
2441+ continue
2442+ ;;
2443+ yes)
2444+ # We got the output file
2445+ user_target=set
2446+ libobj="$arg"
2447+ continue
2448+ ;;
2449+ esac
2450+
2451+ # Accept the current argument as the source file.
2452+ lastarg="$srcfile"
2453+ srcfile="$arg"
2454+
2455+ # Aesthetically quote the previous argument.
2456+
2457+ # Backslashify any backslashes, double quotes, and dollar signs.
2458+ # These are the only characters that are still specially
2459+ # interpreted inside of double-quoted scrings.
2460+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
2461+
2462+ # Double-quote args containing other shell metacharacters.
2463+ # Many Bourne shells cannot handle close brackets correctly in scan
2464+ # sets, so we specify it separately.
2465+ case "$lastarg" in
2466+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
2467+ lastarg="\"$lastarg\""
2468+ ;;
2469+ esac
2470+
2471+ # Add the previous argument to base_compile.
2472+ if test -z "$base_compile"; then
2473+ base_compile="$lastarg"
2474+ else
2475+ base_compile="$base_compile $lastarg"
2476+ fi
2477+ done
2478+
2479+ case "$user_target" in
2480+ set)
2481+ ;;
2482+ no)
2483+ # Get the name of the library object.
2484+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
2485+ ;;
2486+ *)
2487+ $echo "$modename: you must specify a target with \`-o'" 1>&2
2488+ exit 1
2489+ ;;
2490+ esac
2491+
2492+ # Recognize several different file suffixes.
2493+ # If the user specifies -o file.o, it is replaced with file.lo
2494+ xform='[cCFSfmso]'
2495+ case "$libobj" in
2496+ *.ada) xform=ada ;;
2497+ *.adb) xform=adb ;;
2498+ *.ads) xform=ads ;;
2499+ *.asm) xform=asm ;;
2500+ *.c++) xform=c++ ;;
2501+ *.cc) xform=cc ;;
2502+ *.cpp) xform=cpp ;;
2503+ *.cxx) xform=cxx ;;
2504+ *.f90) xform=f90 ;;
2505+ *.for) xform=for ;;
2506+ esac
2507+
2508+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
2509+
2510+ case "$libobj" in
2511+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
2512+ *)
2513+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
2514+ exit 1
2515+ ;;
2516+ esac
2517+
2518+ if test -z "$base_compile"; then
2519+ $echo "$modename: you must specify a compilation command" 1>&2
2520+ $echo "$help" 1>&2
2521+ exit 1
2522+ fi
2523+
2524+ # Delete any leftover library objects.
2525+ if test "$build_old_libs" = yes; then
2526+ removelist="$obj $libobj"
2527+ else
2528+ removelist="$libobj"
2529+ fi
2530+
2531+ $run $rm $removelist
2532+ trap "$run $rm $removelist; exit 1" 1 2 15
2533+
2534+ # Calculate the filename of the output object if compiler does
2535+ # not support -o with -c
2536+ if test "$compiler_c_o" = no; then
2537+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
2538+ lockfile="$output_obj.lock"
2539+ removelist="$removelist $output_obj $lockfile"
2540+ trap "$run $rm $removelist; exit 1" 1 2 15
2541+ else
2542+ need_locks=no
2543+ lockfile=
2544+ fi
2545+
2546+ # Lock this critical section if it is needed
2547+ # We use this script file to make the link, it avoids creating a new file
2548+ if test "$need_locks" = yes; then
2549+ until ln "$0" "$lockfile" 2>/dev/null; do
2550+ $show "Waiting for $lockfile to be removed"
2551+ sleep 2
2552+ done
2553+ elif test "$need_locks" = warn; then
2554+ if test -f "$lockfile"; then
2555+ echo "\
2556+*** ERROR, $lockfile exists and contains:
2557+`cat $lockfile 2>/dev/null`
2558+
2559+This indicates that another process is trying to use the same
2560+temporary object file, and libtool could not work around it because
2561+your compiler does not support \`-c' and \`-o' together. If you
2562+repeat this compilation, it may succeed, by chance, but you had better
2563+avoid parallel builds (make -j) in this platform, or get a better
2564+compiler."
2565+
2566+ $run $rm $removelist
2567+ exit 1
2568+ fi
2569+ echo $srcfile > "$lockfile"
2570+ fi
2571+
2572+ if test -n "$fix_srcfile_path"; then
2573+ eval srcfile=\"$fix_srcfile_path\"
2574+ fi
2575+
2576+ # Only build a PIC object if we are building libtool libraries.
2577+ if test "$build_libtool_libs" = yes; then
2578+ # Without this assignment, base_compile gets emptied.
2579+ fbsd_hideous_sh_bug=$base_compile
2580+
2581+ # All platforms use -DPIC, to notify preprocessed assembler code.
2582+ command="$base_compile $pic_flag -DPIC $srcfile"
2583+ if test "$build_old_libs" = yes; then
2584+ lo_libobj="$libobj"
2585+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
2586+ if test "X$dir" = "X$libobj"; then
2587+ dir="$objdir"
2588+ else
2589+ dir="$dir/$objdir"
2590+ fi
2591+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
2592+
2593+ if test -d "$dir"; then
2594+ $show "$rm $libobj"
2595+ $run $rm $libobj
2596+ else
2597+ $show "$mkdir $dir"
2598+ $run $mkdir $dir
2599+ status=$?
2600+ if test $status -ne 0 && test ! -d $dir; then
2601+ exit $status
2602+ fi
2603+ fi
2604+ fi
2605+ if test "$compiler_o_lo" = yes; then
2606+ output_obj="$libobj"
2607+ command="$command -o $output_obj"
2608+ elif test "$compiler_c_o" = yes; then
2609+ output_obj="$obj"
2610+ command="$command -o $output_obj"
2611+ fi
2612+
2613+ $run $rm "$output_obj"
2614+ $show "$command"
2615+ if $run eval "$command"; then :
2616+ else
2617+ test -n "$output_obj" && $run $rm $removelist
2618+ exit 1
2619+ fi
2620+
2621+ if test "$need_locks" = warn &&
2622+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
2623+ echo "\
2624+*** ERROR, $lockfile contains:
2625+`cat $lockfile 2>/dev/null`
2626+
2627+but it should contain:
2628+$srcfile
2629+
2630+This indicates that another process is trying to use the same
2631+temporary object file, and libtool could not work around it because
2632+your compiler does not support \`-c' and \`-o' together. If you
2633+repeat this compilation, it may succeed, by chance, but you had better
2634+avoid parallel builds (make -j) in this platform, or get a better
2635+compiler."
2636+
2637+ $run $rm $removelist
2638+ exit 1
2639+ fi
2640+
2641+ # Just move the object if needed, then go on to compile the next one
2642+ if test x"$output_obj" != x"$libobj"; then
2643+ $show "$mv $output_obj $libobj"
2644+ if $run $mv $output_obj $libobj; then :
2645+ else
2646+ error=$?
2647+ $run $rm $removelist
2648+ exit $error
2649+ fi
2650+ fi
2651+
2652+ # If we have no pic_flag, then copy the object into place and finish.
2653+ if test -z "$pic_flag" && test "$build_old_libs" = yes; then
2654+ # Rename the .lo from within objdir to obj
2655+ if test -f $obj; then
2656+ $show $rm $obj
2657+ $run $rm $obj
2658+ fi
2659+
2660+ $show "$mv $libobj $obj"
2661+ if $run $mv $libobj $obj; then :
2662+ else
2663+ error=$?
2664+ $run $rm $removelist
2665+ exit $error
2666+ fi
2667+
2668+ # Now arrange that obj and lo_libobj become the same file
2669+ $show "$LN_S $obj $lo_libobj"
2670+ if $run $LN_S $obj $lo_libobj; then
2671+ exit 0
2672+ else
2673+ error=$?
2674+ $run $rm $removelist
2675+ exit $error
2676+ fi
2677+ fi
2678+
2679+ # Allow error messages only from the first compilation.
2680+ suppress_output=' >/dev/null 2>&1'
2681+ fi
2682+
2683+ # Only build a position-dependent object if we build old libraries.
2684+ if test "$build_old_libs" = yes; then
2685+ command="$base_compile $srcfile"
2686+ if test "$compiler_c_o" = yes; then
2687+ command="$command -o $obj"
2688+ output_obj="$obj"
2689+ fi
2690+
2691+ # Suppress compiler output if we already did a PIC compilation.
2692+ command="$command$suppress_output"
2693+ $run $rm "$output_obj"
2694+ $show "$command"
2695+ if $run eval "$command"; then :
2696+ else
2697+ $run $rm $removelist
2698+ exit 1
2699+ fi
2700+
2701+ if test "$need_locks" = warn &&
2702+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
2703+ echo "\
2704+*** ERROR, $lockfile contains:
2705+`cat $lockfile 2>/dev/null`
2706+
2707+but it should contain:
2708+$srcfile
2709+
2710+This indicates that another process is trying to use the same
2711+temporary object file, and libtool could not work around it because
2712+your compiler does not support \`-c' and \`-o' together. If you
2713+repeat this compilation, it may succeed, by chance, but you had better
2714+avoid parallel builds (make -j) in this platform, or get a better
2715+compiler."
2716+
2717+ $run $rm $removelist
2718+ exit 1
2719+ fi
2720+
2721+ # Just move the object if needed
2722+ if test x"$output_obj" != x"$obj"; then
2723+ $show "$mv $output_obj $obj"
2724+ if $run $mv $output_obj $obj; then :
2725+ else
2726+ error=$?
2727+ $run $rm $removelist
2728+ exit $error
2729+ fi
2730+ fi
2731+
2732+ # Create an invalid libtool object if no PIC, so that we do not
2733+ # accidentally link it into a program.
2734+ if test "$build_libtool_libs" != yes; then
2735+ $show "echo timestamp > $libobj"
2736+ $run eval "echo timestamp > \$libobj" || exit $?
2737+ else
2738+ # Move the .lo from within objdir
2739+ $show "$mv $libobj $lo_libobj"
2740+ if $run $mv $libobj $lo_libobj; then :
2741+ else
2742+ error=$?
2743+ $run $rm $removelist
2744+ exit $error
2745+ fi
2746+ fi
2747+ fi
2748+
2749+ # Unlock the critical section if it was locked
2750+ if test "$need_locks" != no; then
2751+ $rm "$lockfile"
2752+ fi
2753+
2754+ exit 0
2755+ ;;
2756+
2757+ # libtool link mode
2758+ link)
2759+ modename="$modename: link"
2760+ C_compiler="$CC" # save it, to compile generated C sources
2761+ CC="$nonopt"
2762+ case "$host" in
2763+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
2764+ # It is impossible to link a dll without this setting, and
2765+ # we shouldn't force the makefile maintainer to figure out
2766+ # which system we are compiling for in order to pass an extra
2767+ # flag for every libtool invokation.
2768+ # allow_undefined=no
2769+
2770+ # FIXME: Unfortunately, there are problems with the above when trying
2771+ # to make a dll which has undefined symbols, in which case not
2772+ # even a static library is built. For now, we need to specify
2773+ # -no-undefined on the libtool link line when we can be certain
2774+ # that all symbols are satisfied, otherwise we get a static library.
2775+ allow_undefined=yes
2776+
2777+ # This is a source program that is used to create dlls on Windows
2778+ # Don't remove nor modify the starting and closing comments
2779+# /* ltdll.c starts here */
2780+# #define WIN32_LEAN_AND_MEAN
2781+# #include <windows.h>
2782+# #undef WIN32_LEAN_AND_MEAN
2783+# #include <stdio.h>
2784+#
2785+# #ifndef __CYGWIN__
2786+# # ifdef __CYGWIN32__
2787+# # define __CYGWIN__ __CYGWIN32__
2788+# # endif
2789+# #endif
2790+#
2791+# #ifdef __cplusplus
2792+# extern "C" {
2793+# #endif
2794+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2795+# #ifdef __cplusplus
2796+# }
2797+# #endif
2798+#
2799+# #ifdef __CYGWIN__
2800+# #include <cygwin/cygwin_dll.h>
2801+# DECLARE_CYGWIN_DLL( DllMain );
2802+# #endif
2803+# HINSTANCE __hDllInstance_base;
2804+#
2805+# BOOL APIENTRY
2806+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2807+# {
2808+# __hDllInstance_base = hInst;
2809+# return TRUE;
2810+# }
2811+# /* ltdll.c ends here */
2812+ # This is a source program that is used to create import libraries
2813+ # on Windows for dlls which lack them. Don't remove nor modify the
2814+ # starting and closing comments
2815+# /* impgen.c starts here */
2816+# /* Copyright (C) 1999 Free Software Foundation, Inc.
2817+#
2818+# This file is part of GNU libtool.
2819+#
2820+# This program is free software; you can redistribute it and/or modify
2821+# it under the terms of the GNU General Public License as published by
2822+# the Free Software Foundation; either version 2 of the License, or
2823+# (at your option) any later version.
2824+#
2825+# This program is distributed in the hope that it will be useful,
2826+# but WITHOUT ANY WARRANTY; without even the implied warranty of
2827+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2828+# GNU General Public License for more details.
2829+#
2830+# You should have received a copy of the GNU General Public License
2831+# along with this program; if not, write to the Free Software
2832+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2833+# */
2834+#
2835+# #include <stdio.h> /* for printf() */
2836+# #include <unistd.h> /* for open(), lseek(), read() */
2837+# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2838+# #include <string.h> /* for strdup() */
2839+#
2840+# static unsigned int
2841+# pe_get16 (fd, offset)
2842+# int fd;
2843+# int offset;
2844+# {
2845+# unsigned char b[2];
2846+# lseek (fd, offset, SEEK_SET);
2847+# read (fd, b, 2);
2848+# return b[0] + (b[1]<<8);
2849+# }
2850+#
2851+# static unsigned int
2852+# pe_get32 (fd, offset)
2853+# int fd;
2854+# int offset;
2855+# {
2856+# unsigned char b[4];
2857+# lseek (fd, offset, SEEK_SET);
2858+# read (fd, b, 4);
2859+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2860+# }
2861+#
2862+# static unsigned int
2863+# pe_as32 (ptr)
2864+# void *ptr;
2865+# {
2866+# unsigned char *b = ptr;
2867+# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2868+# }
2869+#
2870+# int
2871+# main (argc, argv)
2872+# int argc;
2873+# char *argv[];
2874+# {
2875+# int dll;
2876+# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2877+# unsigned long export_rva, export_size, nsections, secptr, expptr;
2878+# unsigned long name_rvas, nexp;
2879+# unsigned char *expdata, *erva;
2880+# char *filename, *dll_name;
2881+#
2882+# filename = argv[1];
2883+#
2884+# dll = open(filename, O_RDONLY|O_BINARY);
2885+# if (!dll)
2886+# return 1;
2887+#
2888+# dll_name = filename;
2889+#
2890+# for (i=0; filename[i]; i++)
2891+# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
2892+# dll_name = filename + i +1;
2893+#
2894+# pe_header_offset = pe_get32 (dll, 0x3c);
2895+# opthdr_ofs = pe_header_offset + 4 + 20;
2896+# num_entries = pe_get32 (dll, opthdr_ofs + 92);
2897+#
2898+# if (num_entries < 1) /* no exports */
2899+# return 1;
2900+#
2901+# export_rva = pe_get32 (dll, opthdr_ofs + 96);
2902+# export_size = pe_get32 (dll, opthdr_ofs + 100);
2903+# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
2904+# secptr = (pe_header_offset + 4 + 20 +
2905+# pe_get16 (dll, pe_header_offset + 4 + 16));
2906+#
2907+# expptr = 0;
2908+# for (i = 0; i < nsections; i++)
2909+# {
2910+# char sname[8];
2911+# unsigned long secptr1 = secptr + 40 * i;
2912+# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
2913+# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
2914+# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
2915+# lseek(dll, secptr1, SEEK_SET);
2916+# read(dll, sname, 8);
2917+# if (vaddr <= export_rva && vaddr+vsize > export_rva)
2918+# {
2919+# expptr = fptr + (export_rva - vaddr);
2920+# if (export_rva + export_size > vaddr + vsize)
2921+# export_size = vsize - (export_rva - vaddr);
2922+# break;
2923+# }
2924+# }
2925+#
2926+# expdata = (unsigned char*)malloc(export_size);
2927+# lseek (dll, expptr, SEEK_SET);
2928+# read (dll, expdata, export_size);
2929+# erva = expdata - export_rva;
2930+#
2931+# nexp = pe_as32 (expdata+24);
2932+# name_rvas = pe_as32 (expdata+32);
2933+#
2934+# printf ("EXPORTS\n");
2935+# for (i = 0; i<nexp; i++)
2936+# {
2937+# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
2938+# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
2939+# }
2940+#
2941+# return 0;
2942+# }
2943+# /* impgen.c ends here */
2944+ ;;
2945+ *)
2946+ allow_undefined=yes
2947+ ;;
2948+ esac
2949+ compile_command="$CC"
2950+ finalize_command="$CC"
2951+
2952+ compile_rpath=
2953+ finalize_rpath=
2954+ compile_shlibpath=
2955+ finalize_shlibpath=
2956+ convenience=
2957+ old_convenience=
2958+ deplibs=
2959+ linkopts=
2960+
2961+ if test -n "$shlibpath_var"; then
2962+ # get the directories listed in $shlibpath_var
2963+ eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2964+ else
2965+ lib_search_path=
2966+ fi
2967+ # now prepend the system-specific ones
2968+ eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
2969+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2970+
2971+ avoid_version=no
2972+ dlfiles=
2973+ dlprefiles=
2974+ dlself=no
2975+ export_dynamic=no
2976+ export_symbols=
2977+ export_symbols_regex=
2978+ generated=
2979+ libobjs=
2980+ link_against_libtool_libs=
2981+ ltlibs=
2982+ module=no
2983+ objs=
2984+ prefer_static_libs=no
2985+ preload=no
2986+ prev=
2987+ prevarg=
2988+ release=
2989+ rpath=
2990+ xrpath=
2991+ perm_rpath=
2992+ temp_rpath=
2993+ thread_safe=no
2994+ vinfo=
2995+
2996+ # We need to know -static, to get the right output filenames.
2997+ for arg
2998+ do
2999+ case "$arg" in
3000+ -all-static | -static)
3001+ if test "X$arg" = "X-all-static"; then
3002+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
3003+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
3004+ fi
3005+ if test -n "$link_static_flag"; then
3006+ dlopen_self=$dlopen_self_static
3007+ fi
3008+ else
3009+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
3010+ dlopen_self=$dlopen_self_static
3011+ fi
3012+ fi
3013+ build_libtool_libs=no
3014+ build_old_libs=yes
3015+ prefer_static_libs=yes
3016+ break
3017+ ;;
3018+ esac
3019+ done
3020+
3021+ # See if our shared archives depend on static archives.
3022+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
3023+
3024+ # Go through the arguments, transforming them on the way.
3025+ while test $# -gt 0; do
3026+ arg="$1"
3027+ shift
3028+
3029+ # If the previous option needs an argument, assign it.
3030+ if test -n "$prev"; then
3031+ case "$prev" in
3032+ output)
3033+ compile_command="$compile_command @OUTPUT@"
3034+ finalize_command="$finalize_command @OUTPUT@"
3035+ ;;
3036+ esac
3037+
3038+ case "$prev" in
3039+ dlfiles|dlprefiles)
3040+ if test "$preload" = no; then
3041+ # Add the symbol object into the linking commands.
3042+ compile_command="$compile_command @SYMFILE@"
3043+ finalize_command="$finalize_command @SYMFILE@"
3044+ preload=yes
3045+ fi
3046+ case "$arg" in
3047+ *.la | *.lo) ;; # We handle these cases below.
3048+ force)
3049+ if test "$dlself" = no; then
3050+ dlself=needless
3051+ export_dynamic=yes
3052+ fi
3053+ prev=
3054+ continue
3055+ ;;
3056+ self)
3057+ if test "$prev" = dlprefiles; then
3058+ dlself=yes
3059+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
3060+ dlself=yes
3061+ else
3062+ dlself=needless
3063+ export_dynamic=yes
3064+ fi
3065+ prev=
3066+ continue
3067+ ;;
3068+ *)
3069+ if test "$prev" = dlfiles; then
3070+ dlfiles="$dlfiles $arg"
3071+ else
3072+ dlprefiles="$dlprefiles $arg"
3073+ fi
3074+ prev=
3075+ ;;
3076+ esac
3077+ ;;
3078+ expsyms)
3079+ export_symbols="$arg"
3080+ if test ! -f "$arg"; then
3081+ $echo "$modename: symbol file \`$arg' does not exist"
3082+ exit 1
3083+ fi
3084+ prev=
3085+ continue
3086+ ;;
3087+ expsyms_regex)
3088+ export_symbols_regex="$arg"
3089+ prev=
3090+ continue
3091+ ;;
3092+ release)
3093+ release="-$arg"
3094+ prev=
3095+ continue
3096+ ;;
3097+ rpath | xrpath)
3098+ # We need an absolute path.
3099+ case "$arg" in
3100+ [\\/]* | [A-Za-z]:[\\/]*) ;;
3101+ *)
3102+ $echo "$modename: only absolute run-paths are allowed" 1>&2
3103+ exit 1
3104+ ;;
3105+ esac
3106+ if test "$prev" = rpath; then
3107+ case "$rpath " in
3108+ *" $arg "*) ;;
3109+ *) rpath="$rpath $arg" ;;
3110+ esac
3111+ else
3112+ case "$xrpath " in
3113+ *" $arg "*) ;;
3114+ *) xrpath="$xrpath $arg" ;;
3115+ esac
3116+ fi
3117+ prev=
3118+ continue
3119+ ;;
3120+ *)
3121+ eval "$prev=\"\$arg\""
3122+ prev=
3123+ continue
3124+ ;;
3125+ esac
3126+ fi
3127+
3128+ prevarg="$arg"
3129+
3130+ case "$arg" in
3131+ -all-static)
3132+ if test -n "$link_static_flag"; then
3133+ compile_command="$compile_command $link_static_flag"
3134+ finalize_command="$finalize_command $link_static_flag"
3135+ fi
3136+ continue
3137+ ;;
3138+
3139+ -allow-undefined)
3140+ # FIXME: remove this flag sometime in the future.
3141+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
3142+ continue
3143+ ;;
3144+
3145+ -avoid-version)
3146+ avoid_version=yes
3147+ continue
3148+ ;;
3149+
3150+ -dlopen)
3151+ prev=dlfiles
3152+ continue
3153+ ;;
3154+
3155+ -dlpreopen)
3156+ prev=dlprefiles
3157+ continue
3158+ ;;
3159+
3160+ -export-dynamic)
3161+ export_dynamic=yes
3162+ continue
3163+ ;;
3164+
3165+ -export-symbols | -export-symbols-regex)
3166+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3167+ $echo "$modename: not more than one -exported-symbols argument allowed"
3168+ exit 1
3169+ fi
3170+ if test "X$arg" = "X-export-symbols"; then
3171+ prev=expsyms
3172+ else
3173+ prev=expsyms_regex
3174+ fi
3175+ continue
3176+ ;;
3177+
3178+ -L*)
3179+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
3180+ # We need an absolute path.
3181+ case "$dir" in
3182+ [\\/]* | [A-Za-z]:[\\/]*) ;;
3183+ *)
3184+ absdir=`cd "$dir" && pwd`
3185+ if test -z "$absdir"; then
3186+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3187+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
3188+ absdir="$dir"
3189+ fi
3190+ dir="$absdir"
3191+ ;;
3192+ esac
3193+ case " $deplibs " in
3194+ *" $arg "*) ;;
3195+ *) deplibs="$deplibs $arg";;
3196+ esac
3197+ case " $lib_search_path " in
3198+ *" $dir "*) ;;
3199+ *) lib_search_path="$lib_search_path $dir";;
3200+ esac
3201+ case "$host" in
3202+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
3203+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
3204+ case ":$dllsearchpath:" in
3205+ ::) dllsearchpath="$dllsearchdir";;
3206+ *":$dllsearchdir:"*) ;;
3207+ *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
3208+ esac
3209+ ;;
3210+ esac
3211+ ;;
3212+
3213+ -l*)
3214+ if test "$arg" = "-lc"; then
3215+ case "$host" in
3216+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
3217+ # These systems don't actually have c library (as such)
3218+ continue
3219+ ;;
3220+ esac
3221+ elif test "$arg" = "-lm"; then
3222+ case "$host" in
3223+ *-*-cygwin* | *-*-beos*)
3224+ # These systems don't actually have math library (as such)
3225+ continue
3226+ ;;
3227+ esac
3228+ fi
3229+ deplibs="$deplibs $arg"
3230+ ;;
3231+
3232+ -module)
3233+ module=yes
3234+ continue
3235+ ;;
3236+
3237+ -no-undefined)
3238+ allow_undefined=no
3239+ continue
3240+ ;;
3241+
3242+ -o) prev=output ;;
3243+
3244+ -release)
3245+ prev=release
3246+ continue
3247+ ;;
3248+
3249+ -rpath)
3250+ prev=rpath
3251+ continue
3252+ ;;
3253+
3254+ -R)
3255+ prev=xrpath
3256+ continue
3257+ ;;
3258+
3259+ -R*)
3260+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
3261+ # We need an absolute path.
3262+ case "$dir" in
3263+ [\\/]* | [A-Za-z]:[\\/]*) ;;
3264+ *)
3265+ $echo "$modename: only absolute run-paths are allowed" 1>&2
3266+ exit 1
3267+ ;;
3268+ esac
3269+ case "$xrpath " in
3270+ *" $dir "*) ;;
3271+ *) xrpath="$xrpath $dir" ;;
3272+ esac
3273+ continue
3274+ ;;
3275+
3276+ -static)
3277+ # If we have no pic_flag, then this is the same as -all-static.
3278+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
3279+ compile_command="$compile_command $link_static_flag"
3280+ finalize_command="$finalize_command $link_static_flag"
3281+ fi
3282+ continue
3283+ ;;
3284+
3285+ -thread-safe)
3286+ thread_safe=yes
3287+ continue
3288+ ;;
3289+
3290+ -version-info)
3291+ prev=vinfo
3292+ continue
3293+ ;;
3294+
3295+ # Some other compiler flag.
3296+ -* | +*)
3297+ # Unknown arguments in both finalize_command and compile_command need
3298+ # to be aesthetically quoted because they are evaled later.
3299+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3300+ case "$arg" in
3301+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3302+ arg="\"$arg\""
3303+ ;;
3304+ esac
3305+ ;;
3306+
3307+ *.o | *.obj | *.a | *.lib)
3308+ # A standard object.
3309+ objs="$objs $arg"
3310+ ;;
3311+
3312+ *.lo)
3313+ # A library object.
3314+ if test "$prev" = dlfiles; then
3315+ dlfiles="$dlfiles $arg"
3316+ if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
3317+ prev=
3318+ continue
3319+ else
3320+ # If libtool objects are unsupported, then we need to preload.
3321+ prev=dlprefiles
3322+ fi
3323+ fi
3324+
3325+ if test "$prev" = dlprefiles; then
3326+ # Preload the old-style object.
3327+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
3328+ prev=
3329+ fi
3330+ libobjs="$libobjs $arg"
3331+ ;;
3332+
3333+ *.la)
3334+ # A libtool-controlled library.
3335+
3336+ dlname=
3337+ libdir=
3338+ library_names=
3339+ old_library=
3340+
3341+ # Check to see that this really is a libtool archive.
3342+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3343+ else
3344+ $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
3345+ exit 1
3346+ fi
3347+
3348+ # If the library was installed with an old release of libtool,
3349+ # it will not redefine variable installed.
3350+ installed=yes
3351+
3352+ # Read the .la file
3353+ # If there is no directory component, then add one.
3354+ case "$arg" in
3355+ */* | *\\*) . $arg ;;
3356+ *) . ./$arg ;;
3357+ esac
3358+
3359+ # Get the name of the library we link against.
3360+ linklib=
3361+ for l in $old_library $library_names; do
3362+ linklib="$l"
3363+ done
3364+
3365+ if test -z "$linklib"; then
3366+ $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
3367+ exit 1
3368+ fi
3369+
3370+ # Find the relevant object directory and library name.
3371+ name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
3372+
3373+ if test "X$installed" = Xyes; then
3374+ dir="$libdir"
3375+ else
3376+ dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
3377+ if test "X$dir" = "X$arg"; then
3378+ dir="$objdir"
3379+ else
3380+ dir="$dir/$objdir"
3381+ fi
3382+ fi
3383+
3384+ if test -n "$dependency_libs"; then
3385+ # Extract -R and -L from dependency_libs
3386+ temp_deplibs=
3387+ for deplib in $dependency_libs; do
3388+ case "$deplib" in
3389+ -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
3390+ case " $rpath $xrpath " in
3391+ *" $temp_xrpath "*) ;;
3392+ *) xrpath="$xrpath $temp_xrpath";;
3393+ esac;;
3394+ -L*) case "$compile_command $temp_deplibs " in
3395+ *" $deplib "*) ;;
3396+ *) temp_deplibs="$temp_deplibs $deplib";;
3397+ esac
3398+ temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
3399+ case " $lib_search_path " in
3400+ *" $temp_dir "*) ;;
3401+ *) lib_search_path="$lib_search_path $temp_dir";;
3402+ esac
3403+ ;;
3404+ *) temp_deplibs="$temp_deplibs $deplib";;
3405+ esac
3406+ done
3407+ dependency_libs="$temp_deplibs"
3408+ fi
3409+
3410+ if test -z "$libdir"; then
3411+ # It is a libtool convenience library, so add in its objects.
3412+ convenience="$convenience $dir/$old_library"
3413+ old_convenience="$old_convenience $dir/$old_library"
3414+ deplibs="$deplibs$dependency_libs"
3415+ compile_command="$compile_command $dir/$old_library$dependency_libs"
3416+ finalize_command="$finalize_command $dir/$old_library$dependency_libs"
3417+ continue
3418+ fi
3419+
3420+ # This library was specified with -dlopen.
3421+ if test "$prev" = dlfiles; then
3422+ dlfiles="$dlfiles $arg"
3423+ if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
3424+ # If there is no dlname, no dlopen support or we're linking statically,
3425+ # we need to preload.
3426+ prev=dlprefiles
3427+ else
3428+ # We should not create a dependency on this library, but we
3429+ # may need any libraries it requires.
3430+ compile_command="$compile_command$dependency_libs"
3431+ finalize_command="$finalize_command$dependency_libs"
3432+ prev=
3433+ continue
3434+ fi
3435+ fi
3436+
3437+ # The library was specified with -dlpreopen.
3438+ if test "$prev" = dlprefiles; then
3439+ # Prefer using a static library (so that no silly _DYNAMIC symbols
3440+ # are required to link).
3441+ if test -n "$old_library"; then
3442+ dlprefiles="$dlprefiles $dir/$old_library"
3443+ else
3444+ dlprefiles="$dlprefiles $dir/$linklib"
3445+ fi
3446+ prev=
3447+ fi
3448+
3449+ if test -n "$library_names" &&
3450+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
3451+ link_against_libtool_libs="$link_against_libtool_libs $arg"
3452+ if test -n "$shlibpath_var"; then
3453+ # Make sure the rpath contains only unique directories.
3454+ case "$temp_rpath " in
3455+ *" $dir "*) ;;
3456+ *) temp_rpath="$temp_rpath $dir" ;;
3457+ esac
3458+ fi
3459+
3460+ # We need an absolute path.
3461+ case "$dir" in
3462+ [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
3463+ *)
3464+ absdir=`cd "$dir" && pwd`
3465+ if test -z "$absdir"; then
3466+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3467+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
3468+ absdir="$dir"
3469+ fi
3470+ ;;
3471+ esac
3472+
3473+ # This is the magic to use -rpath.
3474+ # Skip directories that are in the system default run-time
3475+ # search path, unless they have been requested with -R.
3476+ case " $sys_lib_dlsearch_path " in
3477+ *" $absdir "*) ;;
3478+ *)
3479+ case "$compile_rpath " in
3480+ *" $absdir "*) ;;
3481+ *) compile_rpath="$compile_rpath $absdir"
3482+ esac
3483+ ;;
3484+ esac
3485+
3486+ case " $sys_lib_dlsearch_path " in
3487+ *" $libdir "*) ;;
3488+ *)
3489+ case "$finalize_rpath " in
3490+ *" $libdir "*) ;;
3491+ *) finalize_rpath="$finalize_rpath $libdir"
3492+ esac
3493+ ;;
3494+ esac
3495+
3496+ lib_linked=yes
3497+ case "$hardcode_action" in
3498+ immediate | unsupported)
3499+ if test "$hardcode_direct" = no; then
3500+ compile_command="$compile_command $dir/$linklib"
3501+ deplibs="$deplibs $dir/$linklib"
3502+ case "$host" in
3503+ *-*-cygwin* | *-*-mingw* | *-*-os2*)
3504+ dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
3505+ if test -n "$dllsearchpath"; then
3506+ dllsearchpath="$dllsearchpath:$dllsearchdir"
3507+ else
3508+ dllsearchpath="$dllsearchdir"
3509+ fi
3510+ ;;
3511+ esac
3512+ elif test "$hardcode_minus_L" = no; then
3513+ case "$host" in
3514+ *-*-sunos*)
3515+ compile_shlibpath="$compile_shlibpath$dir:"
3516+ ;;
3517+ esac
3518+ case "$compile_command " in
3519+ *" -L$dir "*) ;;
3520+ *) compile_command="$compile_command -L$dir";;
3521+ esac
3522+ compile_command="$compile_command -l$name"
3523+ deplibs="$deplibs -L$dir -l$name"
3524+ elif test "$hardcode_shlibpath_var" = no; then
3525+ case ":$compile_shlibpath:" in
3526+ *":$dir:"*) ;;
3527+ *) compile_shlibpath="$compile_shlibpath$dir:";;
3528+ esac
3529+ compile_command="$compile_command -l$name"
3530+ deplibs="$deplibs -l$name"
3531+ else
3532+ lib_linked=no
3533+ fi
3534+ ;;
3535+
3536+ relink)
3537+ if test "$hardcode_direct" = yes; then
3538+ compile_command="$compile_command $absdir/$linklib"
3539+ deplibs="$deplibs $absdir/$linklib"
3540+ elif test "$hardcode_minus_L" = yes; then
3541+ case "$compile_command " in
3542+ *" -L$absdir "*) ;;
3543+ *) compile_command="$compile_command -L$absdir";;
3544+ esac
3545+ compile_command="$compile_command -l$name"
3546+ deplibs="$deplibs -L$absdir -l$name"
3547+ elif test "$hardcode_shlibpath_var" = yes; then
3548+ case ":$compile_shlibpath:" in
3549+ *":$absdir:"*) ;;
3550+ *) compile_shlibpath="$compile_shlibpath$absdir:";;
3551+ esac
3552+ compile_command="$compile_command -l$name"
3553+ deplibs="$deplibs -l$name"
3554+ else
3555+ lib_linked=no
3556+ fi
3557+ ;;
3558+
3559+ *)
3560+ lib_linked=no
3561+ ;;
3562+ esac
3563+
3564+ if test "$lib_linked" != yes; then
3565+ $echo "$modename: configuration error: unsupported hardcode properties"
3566+ exit 1
3567+ fi
3568+
3569+ # Finalize command for both is simple: just hardcode it.
3570+ if test "$hardcode_direct" = yes; then
3571+ finalize_command="$finalize_command $libdir/$linklib"
3572+ elif test "$hardcode_minus_L" = yes; then
3573+ case "$finalize_command " in
3574+ *" -L$libdir "*) ;;
3575+ *) finalize_command="$finalize_command -L$libdir";;
3576+ esac
3577+ finalize_command="$finalize_command -l$name"
3578+ elif test "$hardcode_shlibpath_var" = yes; then
3579+ case ":$finalize_shlibpath:" in
3580+ *":$libdir:"*) ;;
3581+ *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
3582+ esac
3583+ finalize_command="$finalize_command -l$name"
3584+ else
3585+ # We cannot seem to hardcode it, guess we'll fake it.
3586+ case "$finalize_command " in
3587+ *" -L$dir "*) ;;
3588+ *) finalize_command="$finalize_command -L$libdir";;
3589+ esac
3590+ finalize_command="$finalize_command -l$name"
3591+ fi
3592+ else
3593+ # Transform directly to old archives if we don't build new libraries.
3594+ if test -n "$pic_flag" && test -z "$old_library"; then
3595+ $echo "$modename: cannot find static library for \`$arg'" 1>&2
3596+ exit 1
3597+ fi
3598+
3599+ # Here we assume that one of hardcode_direct or hardcode_minus_L
3600+ # is not unsupported. This is valid on all known static and
3601+ # shared platforms.
3602+ if test "$hardcode_direct" != unsupported; then
3603+ test -n "$old_library" && linklib="$old_library"
3604+ compile_command="$compile_command $dir/$linklib"
3605+ finalize_command="$finalize_command $dir/$linklib"
3606+ else
3607+ case "$compile_command " in
3608+ *" -L$dir "*) ;;
3609+ *) compile_command="$compile_command -L$dir";;
3610+ esac
3611+ compile_command="$compile_command -l$name"
3612+ case "$finalize_command " in
3613+ *" -L$dir "*) ;;
3614+ *) finalize_command="$finalize_command -L$dir";;
3615+ esac
3616+ finalize_command="$finalize_command -l$name"
3617+ fi
3618+ fi
3619+
3620+ # Add in any libraries that this one depends upon.
3621+ compile_command="$compile_command$dependency_libs"
3622+ finalize_command="$finalize_command$dependency_libs"
3623+ continue
3624+ ;;
3625+
3626+ # Some other compiler argument.
3627+ *)
3628+ # Unknown arguments in both finalize_command and compile_command need
3629+ # to be aesthetically quoted because they are evaled later.
3630+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3631+ case "$arg" in
3632+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3633+ arg="\"$arg\""
3634+ ;;
3635+ esac
3636+ ;;
3637+ esac
3638+
3639+ # Now actually substitute the argument into the commands.
3640+ if test -n "$arg"; then
3641+ compile_command="$compile_command $arg"
3642+ finalize_command="$finalize_command $arg"
3643+ fi
3644+ done
3645+
3646+ if test -n "$prev"; then
3647+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
3648+ $echo "$help" 1>&2
3649+ exit 1
3650+ fi
3651+
3652+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
3653+ eval arg=\"$export_dynamic_flag_spec\"
3654+ compile_command="$compile_command $arg"
3655+ finalize_command="$finalize_command $arg"
3656+ fi
3657+
3658+ oldlibs=
3659+ # calculate the name of the file, without its directory
3660+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
3661+ libobjs_save="$libobjs"
3662+
3663+ case "$output" in
3664+ "")
3665+ $echo "$modename: you must specify an output file" 1>&2
3666+ $echo "$help" 1>&2
3667+ exit 1
3668+ ;;
3669+
3670+ *.a | *.lib)
3671+ if test -n "$link_against_libtool_libs"; then
3672+ $echo "$modename: error: cannot link libtool libraries into archives" 1>&2
3673+ exit 1
3674+ fi
3675+
3676+ if test -n "$deplibs"; then
3677+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3678+ fi
3679+
3680+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3681+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3682+ fi
3683+
3684+ if test -n "$rpath"; then
3685+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3686+ fi
3687+
3688+ if test -n "$xrpath"; then
3689+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3690+ fi
3691+
3692+ if test -n "$vinfo"; then
3693+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
3694+ fi
3695+
3696+ if test -n "$release"; then
3697+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3698+ fi
3699+
3700+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3701+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3702+ fi
3703+
3704+ # Now set the variables for building old libraries.
3705+ build_libtool_libs=no
3706+ oldlibs="$output"
3707+ ;;
3708+
3709+ *.la)
3710+ # Make sure we only generate libraries of the form `libNAME.la'.
3711+ case "$outputname" in
3712+ lib*)
3713+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3714+ eval libname=\"$libname_spec\"
3715+ ;;
3716+ *)
3717+ if test "$module" = no; then
3718+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3719+ $echo "$help" 1>&2
3720+ exit 1
3721+ fi
3722+ if test "$need_lib_prefix" != no; then
3723+ # Add the "lib" prefix for modules if required
3724+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3725+ eval libname=\"$libname_spec\"
3726+ else
3727+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3728+ fi
3729+ ;;
3730+ esac
3731+
3732+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
3733+ if test "X$output_objdir" = "X$output"; then
3734+ output_objdir="$objdir"
3735+ else
3736+ output_objdir="$output_objdir/$objdir"
3737+ fi
3738+
3739+ if test -n "$objs"; then
3740+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
3741+ exit 1
3742+ fi
3743+
3744+ # How the heck are we supposed to write a wrapper for a shared library?
3745+ if test -n "$link_against_libtool_libs"; then
3746+ $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
3747+ exit 1
3748+ fi
3749+
3750+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3751+ $echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
3752+ fi
3753+
3754+ set dummy $rpath
3755+ if test $# -gt 2; then
3756+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3757+ fi
3758+ install_libdir="$2"
3759+
3760+ oldlibs=
3761+ if test -z "$rpath"; then
3762+ if test "$build_libtool_libs" = yes; then
3763+ # Building a libtool convenience library.
3764+ libext=al
3765+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
3766+ build_libtool_libs=convenience
3767+ build_old_libs=yes
3768+ fi
3769+ dependency_libs="$deplibs"
3770+
3771+ if test -n "$vinfo"; then
3772+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
3773+ fi
3774+
3775+ if test -n "$release"; then
3776+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3777+ fi
3778+ else
3779+
3780+ # Parse the version information argument.
3781+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
3782+ set dummy $vinfo 0 0 0
3783+ IFS="$save_ifs"
3784+
3785+ if test -n "$8"; then
3786+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
3787+ $echo "$help" 1>&2
3788+ exit 1
3789+ fi
3790+
3791+ current="$2"
3792+ revision="$3"
3793+ age="$4"
3794+
3795+ # Check that each of the things are valid numbers.
3796+ case "$current" in
3797+ 0 | [1-9] | [1-9][0-9]*) ;;
3798+ *)
3799+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3800+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3801+ exit 1
3802+ ;;
3803+ esac
3804+
3805+ case "$revision" in
3806+ 0 | [1-9] | [1-9][0-9]*) ;;
3807+ *)
3808+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3809+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3810+ exit 1
3811+ ;;
3812+ esac
3813+
3814+ case "$age" in
3815+ 0 | [1-9] | [1-9][0-9]*) ;;
3816+ *)
3817+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3818+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3819+ exit 1
3820+ ;;
3821+ esac
3822+
3823+ if test $age -gt $current; then
3824+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3825+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3826+ exit 1
3827+ fi
3828+
3829+ # Calculate the version variables.
3830+ major=
3831+ versuffix=
3832+ verstring=
3833+ case "$version_type" in
3834+ none) ;;
3835+
3836+ irix)
3837+ major=`expr $current - $age + 1`
3838+ versuffix="$major.$revision"
3839+ verstring="sgi$major.$revision"
3840+
3841+ # Add in all the interfaces that we are compatible with.
3842+ loop=$revision
3843+ while test $loop != 0; do
3844+ iface=`expr $revision - $loop`
3845+ loop=`expr $loop - 1`
3846+ verstring="sgi$major.$iface:$verstring"
3847+ done
3848+ ;;
3849+
3850+ linux)
3851+ major=.`expr $current - $age`
3852+ versuffix="$major.$age.$revision"
3853+ ;;
3854+
3855+ osf)
3856+ major=`expr $current - $age`
3857+ versuffix=".$current.$age.$revision"
3858+ verstring="$current.$age.$revision"
3859+
3860+ # Add in all the interfaces that we are compatible with.
3861+ loop=$age
3862+ while test $loop != 0; do
3863+ iface=`expr $current - $loop`
3864+ loop=`expr $loop - 1`
3865+ verstring="$verstring:${iface}.0"
3866+ done
3867+
3868+ # Make executables depend on our current version.
3869+ verstring="$verstring:${current}.0"
3870+ ;;
3871+
3872+ sunos)
3873+ major=".$current"
3874+ versuffix=".$current.$revision"
3875+ ;;
3876+
3877+ freebsd-aout)
3878+ major=".$current"
3879+ versuffix=".$current.$revision";
3880+ ;;
3881+
3882+ freebsd-elf)
3883+ major=".$current"
3884+ versuffix=".$current";
3885+ ;;
3886+
3887+ windows)
3888+ # Like Linux, but with '-' rather than '.', since we only
3889+ # want one extension on Windows 95.
3890+ major=`expr $current - $age`
3891+ versuffix="-$major-$age-$revision"
3892+ ;;
3893+
3894+ *)
3895+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
3896+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3897+ exit 1
3898+ ;;
3899+ esac
3900+
3901+ # Clear the version info if we defaulted, and they specified a release.
3902+ if test -z "$vinfo" && test -n "$release"; then
3903+ major=
3904+ verstring="0.0"
3905+ if test "$need_version" = no; then
3906+ versuffix=
3907+ else
3908+ versuffix=".0.0"
3909+ fi
3910+ fi
3911+
3912+ # Remove version info from name if versioning should be avoided
3913+ if test "$avoid_version" = yes && test "$need_version" = no; then
3914+ major=
3915+ versuffix=
3916+ verstring=""
3917+ fi
3918+
3919+ # Check to see if the archive will have undefined symbols.
3920+ if test "$allow_undefined" = yes; then
3921+ if test "$allow_undefined_flag" = unsupported; then
3922+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3923+ build_libtool_libs=no
3924+ build_old_libs=yes
3925+ fi
3926+ else
3927+ # Don't allow undefined symbols.
3928+ allow_undefined_flag="$no_undefined_flag"
3929+ fi
3930+
3931+ dependency_libs="$deplibs"
3932+ case "$host" in
3933+ *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
3934+ # these systems don't actually have a c library (as such)!
3935+ ;;
3936+ *)
3937+ # Add libc to deplibs on all other systems.
3938+ deplibs="$deplibs -lc"
3939+ ;;
3940+ esac
3941+ fi
3942+
3943+ # Create the output directory, or remove our outputs if we need to.
3944+ if test -d $output_objdir; then
3945+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
3946+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
3947+ else
3948+ $show "$mkdir $output_objdir"
3949+ $run $mkdir $output_objdir
3950+ status=$?
3951+ if test $status -ne 0 && test ! -d $output_objdir; then
3952+ exit $status
3953+ fi
3954+ fi
3955+
3956+ # Now set the variables for building old libraries.
3957+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3958+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
3959+
3960+ # Transform .lo files to .o files.
3961+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3962+ fi
3963+
3964+ if test "$build_libtool_libs" = yes; then
3965+ # Transform deplibs into only deplibs that can be linked in shared.
3966+ name_save=$name
3967+ libname_save=$libname
3968+ release_save=$release
3969+ versuffix_save=$versuffix
3970+ major_save=$major
3971+ # I'm not sure if I'm treating the release correctly. I think
3972+ # release should show up in the -l (ie -lgmp5) so we don't want to
3973+ # add it in twice. Is that correct?
3974+ release=""
3975+ versuffix=""
3976+ major=""
3977+ newdeplibs=
3978+ droppeddeps=no
3979+ case "$deplibs_check_method" in
3980+ pass_all)
3981+ # Don't check for shared/static. Everything works.
3982+ # This might be a little naive. We might want to check
3983+ # whether the library exists or not. But this is on
3984+ # osf3 & osf4 and I'm not really sure... Just
3985+ # implementing what was already the behaviour.
3986+ newdeplibs=$deplibs
3987+ ;;
3988+ test_compile)
3989+ # This code stresses the "libraries are programs" paradigm to its
3990+ # limits. Maybe even breaks it. We compile a program, linking it
3991+ # against the deplibs as a proxy for the library. Then we can check
3992+ # whether they linked in statically or dynamically with ldd.
3993+ $rm conftest.c
3994+ cat > conftest.c <<EOF
3995+ int main() { return 0; }
3996+EOF
3997+ $rm conftest
3998+ $C_compiler -o conftest conftest.c $deplibs
3999+ if test $? -eq 0 ; then
4000+ ldd_output=`ldd conftest`
4001+ for i in $deplibs; do
4002+ name="`expr $i : '-l\(.*\)'`"
4003+ # If $name is empty we are operating on a -L argument.
4004+ if test "$name" != "" ; then
4005+ libname=`eval \\$echo \"$libname_spec\"`
4006+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
4007+ set dummy $deplib_matches
4008+ deplib_match=$2
4009+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
4010+ newdeplibs="$newdeplibs $i"
4011+ else
4012+ droppeddeps=yes
4013+ echo
4014+ echo "*** Warning: This library needs some functionality provided by $i."
4015+ echo "*** I have the capability to make that library automatically link in when"
4016+ echo "*** you link to this library. But I can only do this if you have a"
4017+ echo "*** shared version of the library, which you do not appear to have."
4018+ fi
4019+ else
4020+ newdeplibs="$newdeplibs $i"
4021+ fi
4022+ done
4023+ else
4024+ # Error occured in the first compile. Let's try to salvage the situation:
4025+ # Compile a seperate program for each library.
4026+ for i in $deplibs; do
4027+ name="`expr $i : '-l\(.*\)'`"
4028+ # If $name is empty we are operating on a -L argument.
4029+ if test "$name" != "" ; then
4030+ $rm conftest
4031+ $C_compiler -o conftest conftest.c $i
4032+ # Did it work?
4033+ if test $? -eq 0 ; then
4034+ ldd_output=`ldd conftest`
4035+ libname=`eval \\$echo \"$libname_spec\"`
4036+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
4037+ set dummy $deplib_matches
4038+ deplib_match=$2
4039+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
4040+ newdeplibs="$newdeplibs $i"
4041+ else
4042+ droppeddeps=yes
4043+ echo
4044+ echo "*** Warning: This library needs some functionality provided by $i."
4045+ echo "*** I have the capability to make that library automatically link in when"
4046+ echo "*** you link to this library. But I can only do this if you have a"
4047+ echo "*** shared version of the library, which you do not appear to have."
4048+ fi
4049+ else
4050+ droppeddeps=yes
4051+ echo
4052+ echo "*** Warning! Library $i is needed by this library but I was not able to"
4053+ echo "*** make it link in! You will probably need to install it or some"
4054+ echo "*** library that it depends on before this library will be fully"
4055+ echo "*** functional. Installing it before continuing would be even better."
4056+ fi
4057+ else
4058+ newdeplibs="$newdeplibs $i"
4059+ fi
4060+ done
4061+ fi
4062+ ;;
4063+ file_magic*)
4064+ set dummy $deplibs_check_method
4065+ file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
4066+ for a_deplib in $deplibs; do
4067+ name="`expr $a_deplib : '-l\(.*\)'`"
4068+ # If $name is empty we are operating on a -L argument.
4069+ if test "$name" != "" ; then
4070+ libname=`eval \\$echo \"$libname_spec\"`
4071+ for i in $lib_search_path; do
4072+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4073+ for potent_lib in $potential_libs; do
4074+ # Follow soft links.
4075+ if ls -lLd "$potent_lib" 2>/dev/null \
4076+ | grep " -> " >/dev/null; then
4077+ continue
4078+ fi
4079+ # The statement above tries to avoid entering an
4080+ # endless loop below, in case of cyclic links.
4081+ # We might still enter an endless loop, since a link
4082+ # loop can be closed while we follow links,
4083+ # but so what?
4084+ potlib="$potent_lib"
4085+ while test -h "$potlib" 2>/dev/null; do
4086+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
4087+ case "$potliblink" in
4088+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
4089+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4090+ esac
4091+ done
4092+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
4093+ | sed 10q \
4094+ | egrep "$file_magic_regex" > /dev/null; then
4095+ newdeplibs="$newdeplibs $a_deplib"
4096+ a_deplib=""
4097+ break 2
4098+ fi
4099+ done
4100+ done
4101+ if test -n "$a_deplib" ; then
4102+ droppeddeps=yes
4103+ echo
4104+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
4105+ echo "*** I have the capability to make that library automatically link in when"
4106+ echo "*** you link to this library. But I can only do this if you have a"
4107+ echo "*** shared version of the library, which you do not appear to have."
4108+ fi
4109+ else
4110+ # Add a -L argument.
4111+ newdeplibs="$newdeplibs $a_deplib"
4112+ fi
4113+ done # Gone through all deplibs.
4114+ ;;
4115+ none | unknown | *)
4116+ newdeplibs=""
4117+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4118+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
4119+ grep . >/dev/null; then
4120+ echo
4121+ if test "X$deplibs_check_method" = "Xnone"; then
4122+ echo "*** Warning: inter-library dependencies are not supported in this platform."
4123+ else
4124+ echo "*** Warning: inter-library dependencies are not known to be supported."
4125+ fi
4126+ echo "*** All declared inter-library dependencies are being dropped."
4127+ droppeddeps=yes
4128+ fi
4129+ ;;
4130+ esac
4131+ versuffix=$versuffix_save
4132+ major=$major_save
4133+ release=$release_save
4134+ libname=$libname_save
4135+ name=$name_save
4136+
4137+ if test "$droppeddeps" = yes; then
4138+ if test "$module" = yes; then
4139+ echo
4140+ echo "*** Warning: libtool could not satisfy all declared inter-library"
4141+ echo "*** dependencies of module $libname. Therefore, libtool will create"
4142+ echo "*** a static module, that should work as long as the dlopening"
4143+ echo "*** application is linked with the -dlopen flag."
4144+ if test -z "$global_symbol_pipe"; then
4145+ echo
4146+ echo "*** However, this would only work if libtool was able to extract symbol"
4147+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4148+ echo "*** not find such a program. So, this module is probably useless."
4149+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
4150+ fi
4151+ if test "$build_old_libs" = no; then
4152+ oldlibs="$output_objdir/$libname.$libext"
4153+ build_libtool_libs=module
4154+ build_old_libs=yes
4155+ else
4156+ build_libtool_libs=no
4157+ fi
4158+ else
4159+ echo "*** The inter-library dependencies that have been dropped here will be"
4160+ echo "*** automatically added whenever a program is linked with this library"
4161+ echo "*** or is declared to -dlopen it."
4162+ fi
4163+ fi
4164+ # Done checking deplibs!
4165+ deplibs=$newdeplibs
4166+ fi
4167+
4168+ # All the library-specific variables (install_libdir is set above).
4169+ library_names=
4170+ old_library=
4171+ dlname=
4172+
4173+ # Test again, we may have decided not to build it any more
4174+ if test "$build_libtool_libs" = yes; then
4175+ # Get the real and link names of the library.
4176+ eval library_names=\"$library_names_spec\"
4177+ set dummy $library_names
4178+ realname="$2"
4179+ shift; shift
4180+
4181+ if test -n "$soname_spec"; then
4182+ eval soname=\"$soname_spec\"
4183+ else
4184+ soname="$realname"
4185+ fi
4186+
4187+ lib="$output_objdir/$realname"
4188+ for link
4189+ do
4190+ linknames="$linknames $link"
4191+ done
4192+
4193+ # Ensure that we have .o objects for linkers which dislike .lo
4194+ # (e.g. aix) incase we are running --disable-static
4195+ for obj in $libobjs; do
4196+ oldobj=`$echo "X$obj" | $Xsed -e "$lo2o"`
4197+ if test ! -f $oldobj; then
4198+ $show "${LN_S} $obj $oldobj"
4199+ $run ${LN_S} $obj $oldobj || exit $?
4200+ fi
4201+ done
4202+
4203+ # Use standard objects if they are pic
4204+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4205+
4206+ # Prepare the list of exported symbols
4207+ if test -z "$export_symbols"; then
4208+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
4209+ $show "generating symbol list for \`$libname.la'"
4210+ export_symbols="$output_objdir/$libname.exp"
4211+ $run $rm $export_symbols
4212+ eval cmds=\"$export_symbols_cmds\"
4213+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4214+ for cmd in $cmds; do
4215+ IFS="$save_ifs"
4216+ $show "$cmd"
4217+ $run eval "$cmd" || exit $?
4218+ done
4219+ IFS="$save_ifs"
4220+ if test -n "$export_symbols_regex"; then
4221+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4222+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4223+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4224+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
4225+ fi
4226+ fi
4227+ fi
4228+
4229+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
4230+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4231+ fi
4232+
4233+ if test -n "$convenience"; then
4234+ if test -n "$whole_archive_flag_spec"; then
4235+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4236+ else
4237+ gentop="$output_objdir/${outputname}x"
4238+ $show "${rm}r $gentop"
4239+ $run ${rm}r "$gentop"
4240+ $show "mkdir $gentop"
4241+ $run mkdir "$gentop"
4242+ status=$?
4243+ if test $status -ne 0 && test ! -d "$gentop"; then
4244+ exit $status
4245+ fi
4246+ generated="$generated $gentop"
4247+
4248+ for xlib in $convenience; do
4249+ # Extract the objects.
4250+ case "$xlib" in
4251+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4252+ *) xabs=`pwd`"/$xlib" ;;
4253+ esac
4254+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4255+ xdir="$gentop/$xlib"
4256+
4257+ $show "${rm}r $xdir"
4258+ $run ${rm}r "$xdir"
4259+ $show "mkdir $xdir"
4260+ $run mkdir "$xdir"
4261+ status=$?
4262+ if test $status -ne 0 && test ! -d "$xdir"; then
4263+ exit $status
4264+ fi
4265+ $show "(cd $xdir && $AR x $xabs)"
4266+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4267+
4268+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
4269+ done
4270+ fi
4271+ fi
4272+
4273+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4274+ eval flag=\"$thread_safe_flag_spec\"
4275+ linkopts="$linkopts $flag"
4276+ fi
4277+
4278+ # Do each of the archive commands.
4279+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4280+ eval cmds=\"$archive_expsym_cmds\"
4281+ else
4282+ eval cmds=\"$archive_cmds\"
4283+ fi
4284+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4285+ for cmd in $cmds; do
4286+ IFS="$save_ifs"
4287+ $show "$cmd"
4288+ $run eval "$cmd" || exit $?
4289+ done
4290+ IFS="$save_ifs"
4291+
4292+ # Create links to the real library.
4293+ for linkname in $linknames; do
4294+ if test "$realname" != "$linkname"; then
4295+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4296+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4297+ fi
4298+ done
4299+
4300+ # If -module or -export-dynamic was specified, set the dlname.
4301+ if test "$module" = yes || test "$export_dynamic" = yes; then
4302+ # On all known operating systems, these are identical.
4303+ dlname="$soname"
4304+ fi
4305+ fi
4306+ ;;
4307+
4308+ *.lo | *.o | *.obj)
4309+ if test -n "$link_against_libtool_libs"; then
4310+ $echo "$modename: error: cannot link libtool libraries into objects" 1>&2
4311+ exit 1
4312+ fi
4313+
4314+ if test -n "$deplibs"; then
4315+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4316+ fi
4317+
4318+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4319+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4320+ fi
4321+
4322+ if test -n "$rpath"; then
4323+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4324+ fi
4325+
4326+ if test -n "$xrpath"; then
4327+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4328+ fi
4329+
4330+ if test -n "$vinfo"; then
4331+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4332+ fi
4333+
4334+ if test -n "$release"; then
4335+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4336+ fi
4337+
4338+ case "$output" in
4339+ *.lo)
4340+ if test -n "$objs"; then
4341+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4342+ exit 1
4343+ fi
4344+ libobj="$output"
4345+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4346+ ;;
4347+ *)
4348+ libobj=
4349+ obj="$output"
4350+ ;;
4351+ esac
4352+
4353+ # Delete the old objects.
4354+ $run $rm $obj $libobj
4355+
4356+ # Objects from convenience libraries. This assumes
4357+ # single-version convenience libraries. Whenever we create
4358+ # different ones for PIC/non-PIC, this we'll have to duplicate
4359+ # the extraction.
4360+ reload_conv_objs=
4361+ gentop=
4362+ # reload_cmds runs $LD directly, so let us get rid of
4363+ # -Wl from whole_archive_flag_spec
4364+ wl=
4365+
4366+ if test -n "$convenience"; then
4367+ if test -n "$whole_archive_flag_spec"; then
4368+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4369+ else
4370+ gentop="$output_objdir/${obj}x"
4371+ $show "${rm}r $gentop"
4372+ $run ${rm}r "$gentop"
4373+ $show "mkdir $gentop"
4374+ $run mkdir "$gentop"
4375+ status=$?
4376+ if test $status -ne 0 && test ! -d "$gentop"; then
4377+ exit $status
4378+ fi
4379+ generated="$generated $gentop"
4380+
4381+ for xlib in $convenience; do
4382+ # Extract the objects.
4383+ case "$xlib" in
4384+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4385+ *) xabs=`pwd`"/$xlib" ;;
4386+ esac
4387+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4388+ xdir="$gentop/$xlib"
4389+
4390+ $show "${rm}r $xdir"
4391+ $run ${rm}r "$xdir"
4392+ $show "mkdir $xdir"
4393+ $run mkdir "$xdir"
4394+ status=$?
4395+ if test $status -ne 0 && test ! -d "$xdir"; then
4396+ exit $status
4397+ fi
4398+ $show "(cd $xdir && $AR x $xabs)"
4399+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4400+
4401+ reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
4402+ done
4403+ fi
4404+ fi
4405+
4406+ # Create the old-style object.
4407+ reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
4408+
4409+ output="$obj"
4410+ eval cmds=\"$reload_cmds\"
4411+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4412+ for cmd in $cmds; do
4413+ IFS="$save_ifs"
4414+ $show "$cmd"
4415+ $run eval "$cmd" || exit $?
4416+ done
4417+ IFS="$save_ifs"
4418+
4419+ # Exit if we aren't doing a library object file.
4420+ if test -z "$libobj"; then
4421+ if test -n "$gentop"; then
4422+ $show "${rm}r $gentop"
4423+ $run ${rm}r $gentop
4424+ fi
4425+
4426+ exit 0
4427+ fi
4428+
4429+ if test "$build_libtool_libs" != yes; then
4430+ if test -n "$gentop"; then
4431+ $show "${rm}r $gentop"
4432+ $run ${rm}r $gentop
4433+ fi
4434+
4435+ # Create an invalid libtool object if no PIC, so that we don't
4436+ # accidentally link it into a program.
4437+ $show "echo timestamp > $libobj"
4438+ $run eval "echo timestamp > $libobj" || exit $?
4439+ exit 0
4440+ fi
4441+
4442+ if test -n "$pic_flag"; then
4443+ # Only do commands if we really have different PIC objects.
4444+ reload_objs="$libobjs $reload_conv_objs"
4445+ output="$libobj"
4446+ eval cmds=\"$reload_cmds\"
4447+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4448+ for cmd in $cmds; do
4449+ IFS="$save_ifs"
4450+ $show "$cmd"
4451+ $run eval "$cmd" || exit $?
4452+ done
4453+ IFS="$save_ifs"
4454+ else
4455+ # Just create a symlink.
4456+ $show $rm $libobj
4457+ $run $rm $libobj
4458+ $show "$LN_S $obj $libobj"
4459+ $run $LN_S $obj $libobj || exit $?
4460+ fi
4461+
4462+ if test -n "$gentop"; then
4463+ $show "${rm}r $gentop"
4464+ $run ${rm}r $gentop
4465+ fi
4466+
4467+ exit 0
4468+ ;;
4469+
4470+ # Anything else should be a program.
4471+ *)
4472+ if test -n "$vinfo"; then
4473+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4474+ fi
4475+
4476+ if test -n "$release"; then
4477+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4478+ fi
4479+
4480+ if test "$preload" = yes; then
4481+ if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
4482+ test "$dlopen_self_static" = unknown; then
4483+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4484+ fi
4485+ fi
4486+
4487+ if test -n "$rpath$xrpath"; then
4488+ # If the user specified any rpath flags, then add them.
4489+ for libdir in $rpath $xrpath; do
4490+ # This is the magic to use -rpath.
4491+ case "$compile_rpath " in
4492+ *" $libdir "*) ;;
4493+ *) compile_rpath="$compile_rpath $libdir" ;;
4494+ esac
4495+ case "$finalize_rpath " in
4496+ *" $libdir "*) ;;
4497+ *) finalize_rpath="$finalize_rpath $libdir" ;;
4498+ esac
4499+ done
4500+ fi
4501+
4502+ # Now hardcode the library paths
4503+ rpath=
4504+ hardcode_libdirs=
4505+ for libdir in $compile_rpath $finalize_rpath; do
4506+ if test -n "$hardcode_libdir_flag_spec"; then
4507+ if test -n "$hardcode_libdir_separator"; then
4508+ if test -z "$hardcode_libdirs"; then
4509+ hardcode_libdirs="$libdir"
4510+ else
4511+ # Just accumulate the unique libdirs.
4512+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
4513+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4514+ ;;
4515+ *)
4516+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4517+ ;;
4518+ esac
4519+ fi
4520+ else
4521+ eval flag=\"$hardcode_libdir_flag_spec\"
4522+ rpath="$rpath $flag"
4523+ fi
4524+ elif test -n "$runpath_var"; then
4525+ case "$perm_rpath " in
4526+ *" $libdir "*) ;;
4527+ *) perm_rpath="$perm_rpath $libdir" ;;
4528+ esac
4529+ fi
4530+ done
4531+ # Substitute the hardcoded libdirs into the rpath.
4532+ if test -n "$hardcode_libdir_separator" &&
4533+ test -n "$hardcode_libdirs"; then
4534+ libdir="$hardcode_libdirs"
4535+ eval rpath=\" $hardcode_libdir_flag_spec\"
4536+ fi
4537+ compile_rpath="$rpath"
4538+
4539+ rpath=
4540+ hardcode_libdirs=
4541+ for libdir in $finalize_rpath; do
4542+ if test -n "$hardcode_libdir_flag_spec"; then
4543+ if test -n "$hardcode_libdir_separator"; then
4544+ if test -z "$hardcode_libdirs"; then
4545+ hardcode_libdirs="$libdir"
4546+ else
4547+ # Just accumulate the unique libdirs.
4548+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
4549+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4550+ ;;
4551+ *)
4552+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4553+ ;;
4554+ esac
4555+ fi
4556+ else
4557+ eval flag=\"$hardcode_libdir_flag_spec\"
4558+ rpath="$rpath $flag"
4559+ fi
4560+ elif test -n "$runpath_var"; then
4561+ case "$finalize_perm_rpath " in
4562+ *" $libdir "*) ;;
4563+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4564+ esac
4565+ fi
4566+ done
4567+ # Substitute the hardcoded libdirs into the rpath.
4568+ if test -n "$hardcode_libdir_separator" &&
4569+ test -n "$hardcode_libdirs"; then
4570+ libdir="$hardcode_libdirs"
4571+ eval rpath=\" $hardcode_libdir_flag_spec\"
4572+ fi
4573+ finalize_rpath="$rpath"
4574+
4575+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
4576+ if test "X$output_objdir" = "X$output"; then
4577+ output_objdir="$objdir"
4578+ else
4579+ output_objdir="$output_objdir/$objdir"
4580+ fi
4581+
4582+ # Create the binary in the object directory, then wrap it.
4583+ if test ! -d $output_objdir; then
4584+ $show "$mkdir $output_objdir"
4585+ $run $mkdir $output_objdir
4586+ status=$?
4587+ if test $status -ne 0 && test ! -d $output_objdir; then
4588+ exit $status
4589+ fi
4590+ fi
4591+
4592+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
4593+ # Transform all the library objects into standard objects.
4594+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4595+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4596+ fi
4597+
4598+ dlsyms=
4599+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4600+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
4601+ dlsyms="${outputname}S.c"
4602+ else
4603+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4604+ fi
4605+ fi
4606+
4607+ if test -n "$dlsyms"; then
4608+ case "$dlsyms" in
4609+ "") ;;
4610+ *.c)
4611+ # Discover the nlist of each of the dlfiles.
4612+ nlist="$output_objdir/${outputname}.nm"
4613+
4614+ $show "$rm $nlist ${nlist}S ${nlist}T"
4615+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
4616+
4617+ # Parse the name list into a source file.
4618+ $show "creating $output_objdir/$dlsyms"
4619+
4620+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4621+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4622+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4623+
4624+#ifdef __cplusplus
4625+extern \"C\" {
4626+#endif
4627+
4628+/* Prevent the only kind of declaration conflicts we can make. */
4629+#define lt_preloaded_symbols some_other_symbol
4630+
4631+/* External symbol declarations for the compiler. */\
4632+"
4633+
4634+ if test "$dlself" = yes; then
4635+ $show "generating symbol list for \`$output'"
4636+
4637+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4638+
4639+ # Add our own program objects to the symbol list.
4640+ progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4641+ for arg in $progfiles; do
4642+ $show "extracting global C symbols from \`$arg'"
4643+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4644+ done
4645+
4646+ if test -n "$exclude_expsyms"; then
4647+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4648+ $run eval '$mv "$nlist"T "$nlist"'
4649+ fi
4650+
4651+ if test -n "$export_symbols_regex"; then
4652+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4653+ $run eval '$mv "$nlist"T "$nlist"'
4654+ fi
4655+
4656+ # Prepare the list of exported symbols
4657+ if test -z "$export_symbols"; then
4658+ export_symbols="$output_objdir/$output.exp"
4659+ $run $rm $export_symbols
4660+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4661+ else
4662+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4663+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4664+ $run eval 'mv "$nlist"T "$nlist"'
4665+ fi
4666+ fi
4667+
4668+ for arg in $dlprefiles; do
4669+ $show "extracting global C symbols from \`$arg'"
4670+ name=`echo "$arg" | sed -e 's%^.*/%%'`
4671+ $run eval 'echo ": $name " >> "$nlist"'
4672+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4673+ done
4674+
4675+ if test -z "$run"; then
4676+ # Make sure we have at least an empty file.
4677+ test -f "$nlist" || : > "$nlist"
4678+
4679+ if test -n "$exclude_expsyms"; then
4680+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4681+ $mv "$nlist"T "$nlist"
4682+ fi
4683+
4684+ # Try sorting and uniquifying the output.
4685+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
4686+ :
4687+ else
4688+ grep -v "^: " < "$nlist" > "$nlist"S
4689+ fi
4690+
4691+ if test -f "$nlist"S; then
4692+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4693+ else
4694+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
4695+ fi
4696+
4697+ $echo >> "$output_objdir/$dlsyms" "\
4698+
4699+#undef lt_preloaded_symbols
4700+
4701+#if defined (__STDC__) && __STDC__
4702+# define lt_ptr_t void *
4703+#else
4704+# define lt_ptr_t char *
4705+# define const
4706+#endif
4707+
4708+/* The mapping between symbol names and symbols. */
4709+const struct {
4710+ const char *name;
4711+ lt_ptr_t address;
4712+}
4713+lt_preloaded_symbols[] =
4714+{\
4715+"
4716+
4717+ sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
4718+ -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
4719+ < "$nlist" >> "$output_objdir/$dlsyms"
4720+
4721+ $echo >> "$output_objdir/$dlsyms" "\
4722+ {0, (lt_ptr_t) 0}
4723+};
4724+
4725+/* This works around a problem in FreeBSD linker */
4726+#ifdef FREEBSD_WORKAROUND
4727+static const void *lt_preloaded_setup() {
4728+ return lt_preloaded_symbols;
4729+}
4730+#endif
4731+
4732+#ifdef __cplusplus
4733+}
4734+#endif\
4735+"
4736+ fi
4737+
4738+ pic_flag_for_symtable=
4739+ case "$host" in
4740+ # compiling the symbol table file with pic_flag works around
4741+ # a FreeBSD bug that causes programs to crash when -lm is
4742+ # linked before any other PIC object. But we must not use
4743+ # pic_flag when linking with -static. The problem exists in
4744+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4745+ *-*-freebsd2*|*-*-freebsd3.0*)
4746+ case "$compile_command " in
4747+ *" -static "*) ;;
4748+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
4749+ esac
4750+ esac
4751+
4752+ # Now compile the dynamic symbol file.
4753+ $show "(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4754+ $run eval '(cd $output_objdir && $C_compiler -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4755+
4756+ # Clean up the generated files.
4757+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4758+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4759+
4760+ # Transform the symbol file into the correct name.
4761+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4762+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4763+ ;;
4764+ *)
4765+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4766+ exit 1
4767+ ;;
4768+ esac
4769+ else
4770+ # We keep going just in case the user didn't refer to
4771+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4772+ # really was required.
4773+
4774+ # Nullify the symbol file.
4775+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4776+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4777+ fi
4778+
4779+ if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
4780+ # Replace the output file specification.
4781+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4782+ link_command="$compile_command$compile_rpath"
4783+
4784+ # We have no uninstalled library dependencies, so finalize right now.
4785+ $show "$link_command"
4786+ $run eval "$link_command"
4787+ status=$?
4788+
4789+ # Delete the generated files.
4790+ if test -n "$dlsyms"; then
4791+ $show "$rm $output_objdir/${outputname}S.${objext}"
4792+ $run $rm "$output_objdir/${outputname}S.${objext}"
4793+ fi
4794+
4795+ exit $status
4796+ fi
4797+
4798+ if test -n "$shlibpath_var"; then
4799+ # We should set the shlibpath_var
4800+ rpath=
4801+ for dir in $temp_rpath; do
4802+ case "$dir" in
4803+ [\\/]* | [A-Za-z]:[\\/]*)
4804+ # Absolute path.
4805+ rpath="$rpath$dir:"
4806+ ;;
4807+ *)
4808+ # Relative path: add a thisdir entry.
4809+ rpath="$rpath\$thisdir/$dir:"
4810+ ;;
4811+ esac
4812+ done
4813+ temp_rpath="$rpath"
4814+ fi
4815+
4816+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
4817+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4818+ fi
4819+ if test -n "$finalize_shlibpath"; then
4820+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4821+ fi
4822+
4823+ compile_var=
4824+ finalize_var=
4825+ if test -n "$runpath_var"; then
4826+ if test -n "$perm_rpath"; then
4827+ # We should set the runpath_var.
4828+ rpath=
4829+ for dir in $perm_rpath; do
4830+ rpath="$rpath$dir:"
4831+ done
4832+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4833+ fi
4834+ if test -n "$finalize_perm_rpath"; then
4835+ # We should set the runpath_var.
4836+ rpath=
4837+ for dir in $finalize_perm_rpath; do
4838+ rpath="$rpath$dir:"
4839+ done
4840+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4841+ fi
4842+ fi
4843+
4844+ if test "$hardcode_action" = relink; then
4845+ # Fast installation is not supported
4846+ link_command="$compile_var$compile_command$compile_rpath"
4847+ relink_command="$finalize_var$finalize_command$finalize_rpath"
4848+
4849+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4850+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
4851+ else
4852+ if test "$fast_install" != no; then
4853+ link_command="$finalize_var$compile_command$finalize_rpath"
4854+ if test "$fast_install" = yes; then
4855+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4856+ else
4857+ # fast_install is set to needless
4858+ relink_command=
4859+ fi
4860+ else
4861+ link_command="$compile_var$compile_command$compile_rpath"
4862+ relink_command="$finalize_var$finalize_command$finalize_rpath"
4863+ fi
4864+ fi
4865+
4866+ # Replace the output file specification.
4867+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4868+
4869+ # Delete the old output files.
4870+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4871+
4872+ $show "$link_command"
4873+ $run eval "$link_command" || exit $?
4874+
4875+ # Now create the wrapper script.
4876+ $show "creating $output"
4877+
4878+ # Quote the relink command for shipping.
4879+ if test -n "$relink_command"; then
4880+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4881+ fi
4882+
4883+ # Quote $echo for shipping.
4884+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
4885+ case "$0" in
4886+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
4887+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
4888+ esac
4889+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4890+ else
4891+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4892+ fi
4893+
4894+ # Only actually do things if our run command is non-null.
4895+ if test -z "$run"; then
4896+ # win32 will think the script is a binary if it has
4897+ # a .exe suffix, so we strip it off here.
4898+ case $output in
4899+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
4900+ esac
4901+ $rm $output
4902+ trap "$rm $output; exit 1" 1 2 15
4903+
4904+ $echo > $output "\
4905+#! $SHELL
4906+
4907+# $output - temporary wrapper script for $objdir/$outputname
4908+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4909+#
4910+# The $output program cannot be directly executed until all the libtool
4911+# libraries that it depends on are installed.
4912+#
4913+# This wrapper script should never be moved out of the build directory.
4914+# If it is, it will not operate correctly.
4915+
4916+# Sed substitution that helps us do robust quoting. It backslashifies
4917+# metacharacters that are still active within double-quoted strings.
4918+Xsed='sed -e 1s/^X//'
4919+sed_quote_subst='$sed_quote_subst'
4920+
4921+# The HP-UX ksh and POSIX shell print the target directory to stdout
4922+# if CDPATH is set.
4923+if test \"\${CDPATH+set}\" = set; then CDPATH=; export CDPATH; fi
4924+
4925+relink_command=\"$relink_command\"
4926+
4927+# This environment variable determines our operation mode.
4928+if test \"\$libtool_install_magic\" = \"$magic\"; then
4929+ # install mode needs the following variable:
4930+ link_against_libtool_libs='$link_against_libtool_libs'
4931+else
4932+ # When we are sourced in execute mode, \$file and \$echo are already set.
4933+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
4934+ echo=\"$qecho\"
4935+ file=\"\$0\"
4936+ # Make sure echo works.
4937+ if test \"X\$1\" = X--no-reexec; then
4938+ # Discard the --no-reexec flag, and continue.
4939+ shift
4940+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
4941+ # Yippee, \$echo works!
4942+ :
4943+ else
4944+ # Restart under the correct shell, and then maybe \$echo will work.
4945+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
4946+ fi
4947+ fi\
4948+"
4949+ $echo >> $output "\
4950+
4951+ # Find the directory that this script lives in.
4952+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
4953+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4954+
4955+ # Follow symbolic links until we get to the real thisdir.
4956+ file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
4957+ while test -n \"\$file\"; do
4958+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
4959+
4960+ # If there was a directory component, then change thisdir.
4961+ if test \"x\$destdir\" != \"x\$file\"; then
4962+ case \"\$destdir\" in
4963+ [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
4964+ *) thisdir=\"\$thisdir/\$destdir\" ;;
4965+ esac
4966+ fi
4967+
4968+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
4969+ file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
4970+ done
4971+
4972+ # Try to get the absolute directory name.
4973+ absdir=\`cd \"\$thisdir\" && pwd\`
4974+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
4975+"
4976+
4977+ if test "$fast_install" = yes; then
4978+ echo >> $output "\
4979+ program=lt-'$outputname'
4980+ progdir=\"\$thisdir/$objdir\"
4981+
4982+ if test ! -f \"\$progdir/\$program\" || \\
4983+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
4984+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4985+
4986+ file=\"\$\$-\$program\"
4987+
4988+ if test ! -d \"\$progdir\"; then
4989+ $mkdir \"\$progdir\"
4990+ else
4991+ $rm \"\$progdir/\$file\"
4992+ fi"
4993+
4994+ echo >> $output "\
4995+
4996+ # relink executable if necessary
4997+ if test -n \"\$relink_command\"; then
4998+ if (cd \"\$thisdir\" && eval \$relink_command); then :
4999+ else
5000+ $rm \"\$progdir/\$file\"
5001+ exit 1
5002+ fi
5003+ fi
5004+
5005+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5006+ { $rm \"\$progdir/\$program\";
5007+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5008+ $rm \"\$progdir/\$file\"
5009+ fi"
5010+ else
5011+ echo >> $output "\
5012+ program='$outputname$exeext'
5013+ progdir=\"\$thisdir/$objdir\"
5014+"
5015+ fi
5016+
5017+ echo >> $output "\
5018+
5019+ if test -f \"\$progdir/\$program\"; then"
5020+
5021+ # Export our shlibpath_var if we have one.
5022+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5023+ $echo >> $output "\
5024+ # Add our own library path to $shlibpath_var
5025+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5026+
5027+ # Some systems cannot cope with colon-terminated $shlibpath_var
5028+ # The second colon is a workaround for a bug in BeOS R4 sed
5029+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5030+
5031+ export $shlibpath_var
5032+"
5033+ fi
5034+
5035+ # fixup the dll searchpath if we need to.
5036+ if test -n "$dllsearchpath"; then
5037+ $echo >> $output "\
5038+ # Add the dll search path components to the executable PATH
5039+ PATH=$dllsearchpath:\$PATH
5040+"
5041+ fi
5042+
5043+ $echo >> $output "\
5044+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
5045+ # Run the actual program with our arguments.
5046+"
5047+ case $host in
5048+ *-*-cygwin* | *-*-mingw | *-*-os2*)
5049+ # win32 systems need to use the prog path for dll
5050+ # lookup to work
5051+ $echo >> $output "\
5052+ exec \$progdir\\\\\$program \${1+\"\$@\"}
5053+"
5054+ ;;
5055+ *)
5056+ $echo >> $output "\
5057+ # Export the path to the program.
5058+ PATH=\"\$progdir:\$PATH\"
5059+ export PATH
5060+
5061+ exec \$program \${1+\"\$@\"}
5062+"
5063+ ;;
5064+ esac
5065+ $echo >> $output "\
5066+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5067+ exit 1
5068+ fi
5069+ else
5070+ # The program doesn't exist.
5071+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5072+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
5073+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
5074+ exit 1
5075+ fi
5076+fi\
5077+"
5078+ chmod +x $output
5079+ fi
5080+ exit 0
5081+ ;;
5082+ esac
5083+
5084+ # See if we need to build an old-fashioned archive.
5085+ for oldlib in $oldlibs; do
5086+
5087+ if test "$build_libtool_libs" = convenience; then
5088+ oldobjs="$libobjs_save"
5089+ addlibs="$convenience"
5090+ build_libtool_libs=no
5091+ else
5092+ if test "$build_libtool_libs" = module; then
5093+ oldobjs="$libobjs_save"
5094+ build_libtool_libs=no
5095+ else
5096+ oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
5097+ fi
5098+ addlibs="$old_convenience"
5099+ fi
5100+
5101+ if test -n "$addlibs"; then
5102+ gentop="$output_objdir/${outputname}x"
5103+ $show "${rm}r $gentop"
5104+ $run ${rm}r "$gentop"
5105+ $show "mkdir $gentop"
5106+ $run mkdir "$gentop"
5107+ status=$?
5108+ if test $status -ne 0 && test ! -d "$gentop"; then
5109+ exit $status
5110+ fi
5111+ generated="$generated $gentop"
5112+
5113+ # Add in members from convenience archives.
5114+ for xlib in $addlibs; do
5115+ # Extract the objects.
5116+ case "$xlib" in
5117+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5118+ *) xabs=`pwd`"/$xlib" ;;
5119+ esac
5120+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5121+ xdir="$gentop/$xlib"
5122+
5123+ $show "${rm}r $xdir"
5124+ $run ${rm}r "$xdir"
5125+ $show "mkdir $xdir"
5126+ $run mkdir "$xdir"
5127+ status=$?
5128+ if test $status -ne 0 && test ! -d "$xdir"; then
5129+ exit $status
5130+ fi
5131+ $show "(cd $xdir && $AR x $xabs)"
5132+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5133+
5134+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5135+ done
5136+ fi
5137+
5138+ # Do each command in the archive commands.
5139+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5140+ eval cmds=\"$old_archive_from_new_cmds\"
5141+ else
5142+ # Ensure that we have .o objects in place incase we decided
5143+ # not to build a shared library, and have fallen back to building
5144+ # static libs even though --disable-static was passed!
5145+ for oldobj in $oldobjs; do
5146+ if test ! -f $oldobj; then
5147+ obj=`$echo "X$oldobj" | $Xsed -e "$o2lo"`
5148+ $show "${LN_S} $obj $oldobj"
5149+ $run ${LN_S} $obj $oldobj || exit $?
5150+ fi
5151+ done
5152+
5153+ eval cmds=\"$old_archive_cmds\"
5154+ fi
5155+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5156+ for cmd in $cmds; do
5157+ IFS="$save_ifs"
5158+ $show "$cmd"
5159+ $run eval "$cmd" || exit $?
5160+ done
5161+ IFS="$save_ifs"
5162+ done
5163+
5164+ if test -n "$generated"; then
5165+ $show "${rm}r$generated"
5166+ $run ${rm}r$generated
5167+ fi
5168+
5169+ # Now create the libtool archive.
5170+ case "$output" in
5171+ *.la)
5172+ old_library=
5173+ test "$build_old_libs" = yes && old_library="$libname.$libext"
5174+ $show "creating $output"
5175+
5176+ if test -n "$xrpath"; then
5177+ temp_xrpath=
5178+ for libdir in $xrpath; do
5179+ temp_xrpath="$temp_xrpath -R$libdir"
5180+ done
5181+ dependency_libs="$temp_xrpath $dependency_libs"
5182+ fi
5183+
5184+ # Only create the output if not a dry run.
5185+ if test -z "$run"; then
5186+ for installed in no yes; do
5187+ if test "$installed" = yes; then
5188+ if test -z "$install_libdir"; then
5189+ break
5190+ fi
5191+ output="$output_objdir/$outputname"i
5192+ fi
5193+ $rm $output
5194+ $echo > $output "\
5195+# $outputname - a libtool library file
5196+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5197+#
5198+# Please DO NOT delete this file!
5199+# It is necessary for linking the library.
5200+
5201+# The name that we can dlopen(3).
5202+dlname='$dlname'
5203+
5204+# Names of this library.
5205+library_names='$library_names'
5206+
5207+# The name of the static archive.
5208+old_library='$old_library'
5209+
5210+# Libraries that this one depends upon.
5211+dependency_libs='$dependency_libs'
5212+
5213+# Version information for $libname.
5214+current=$current
5215+age=$age
5216+revision=$revision
5217+
5218+# Is this an already installed library?
5219+installed=$installed
5220+
5221+# Directory that this library needs to be installed in:
5222+libdir='$install_libdir'\
5223+"
5224+ done
5225+ fi
5226+
5227+ # Do a symbolic link so that the libtool archive can be found in
5228+ # LD_LIBRARY_PATH before the program is installed.
5229+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5230+ $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
5231+ ;;
5232+ esac
5233+ exit 0
5234+ ;;
5235+
5236+ # libtool install mode
5237+ install)
5238+ modename="$modename: install"
5239+
5240+ # There may be an optional sh(1) argument at the beginning of
5241+ # install_prog (especially on Windows NT).
5242+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
5243+ # Aesthetically quote it.
5244+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5245+ case "$arg" in
5246+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5247+ arg="\"$arg\""
5248+ ;;
5249+ esac
5250+ install_prog="$arg "
5251+ arg="$1"
5252+ shift
5253+ else
5254+ install_prog=
5255+ arg="$nonopt"
5256+ fi
5257+
5258+ # The real first argument should be the name of the installation program.
5259+ # Aesthetically quote it.
5260+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5261+ case "$arg" in
5262+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5263+ arg="\"$arg\""
5264+ ;;
5265+ esac
5266+ install_prog="$install_prog$arg"
5267+
5268+ # We need to accept at least all the BSD install flags.
5269+ dest=
5270+ files=
5271+ opts=
5272+ prev=
5273+ install_type=
5274+ isdir=no
5275+ stripme=
5276+ for arg
5277+ do
5278+ if test -n "$dest"; then
5279+ files="$files $dest"
5280+ dest="$arg"
5281+ continue
5282+ fi
5283+
5284+ case "$arg" in
5285+ -d) isdir=yes ;;
5286+ -f) prev="-f" ;;
5287+ -g) prev="-g" ;;
5288+ -m) prev="-m" ;;
5289+ -o) prev="-o" ;;
5290+ -s)
5291+ stripme=" -s"
5292+ continue
5293+ ;;
5294+ -*) ;;
5295+
5296+ *)
5297+ # If the previous option needed an argument, then skip it.
5298+ if test -n "$prev"; then
5299+ prev=
5300+ else
5301+ dest="$arg"
5302+ continue
5303+ fi
5304+ ;;
5305+ esac
5306+
5307+ # Aesthetically quote the argument.
5308+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5309+ case "$arg" in
5310+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5311+ arg="\"$arg\""
5312+ ;;
5313+ esac
5314+ install_prog="$install_prog $arg"
5315+ done
5316+
5317+ if test -z "$install_prog"; then
5318+ $echo "$modename: you must specify an install program" 1>&2
5319+ $echo "$help" 1>&2
5320+ exit 1
5321+ fi
5322+
5323+ if test -n "$prev"; then
5324+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
5325+ $echo "$help" 1>&2
5326+ exit 1
5327+ fi
5328+
5329+ if test -z "$files"; then
5330+ if test -z "$dest"; then
5331+ $echo "$modename: no file or destination specified" 1>&2
5332+ else
5333+ $echo "$modename: you must specify a destination" 1>&2
5334+ fi
5335+ $echo "$help" 1>&2
5336+ exit 1
5337+ fi
5338+
5339+ # Strip any trailing slash from the destination.
5340+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5341+
5342+ # Check to see that the destination is a directory.
5343+ test -d "$dest" && isdir=yes
5344+ if test "$isdir" = yes; then
5345+ destdir="$dest"
5346+ destname=
5347+ else
5348+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5349+ test "X$destdir" = "X$dest" && destdir=.
5350+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5351+
5352+ # Not a directory, so check to see that there is only one file specified.
5353+ set dummy $files
5354+ if test $# -gt 2; then
5355+ $echo "$modename: \`$dest' is not a directory" 1>&2
5356+ $echo "$help" 1>&2
5357+ exit 1
5358+ fi
5359+ fi
5360+ case "$destdir" in
5361+ [\\/]* | [A-Za-z]:[\\/]*) ;;
5362+ *)
5363+ for file in $files; do
5364+ case "$file" in
5365+ *.lo) ;;
5366+ *)
5367+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5368+ $echo "$help" 1>&2
5369+ exit 1
5370+ ;;
5371+ esac
5372+ done
5373+ ;;
5374+ esac
5375+
5376+ # This variable tells wrapper scripts just to set variables rather
5377+ # than running their programs.
5378+ libtool_install_magic="$magic"
5379+
5380+ staticlibs=
5381+ future_libdirs=
5382+ current_libdirs=
5383+ for file in $files; do
5384+
5385+ # Do each installation.
5386+ case "$file" in
5387+ *.a | *.lib)
5388+ # Do the static libraries later.
5389+ staticlibs="$staticlibs $file"
5390+ ;;
5391+
5392+ *.la)
5393+ # Check to see that this really is a libtool archive.
5394+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5395+ else
5396+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5397+ $echo "$help" 1>&2
5398+ exit 1
5399+ fi
5400+
5401+ library_names=
5402+ old_library=
5403+ # If there is no directory component, then add one.
5404+ case "$file" in
5405+ */* | *\\*) . $file ;;
5406+ *) . ./$file ;;
5407+ esac
5408+
5409+ # Add the libdir to current_libdirs if it is the destination.
5410+ if test "X$destdir" = "X$libdir"; then
5411+ case "$current_libdirs " in
5412+ *" $libdir "*) ;;
5413+ *) current_libdirs="$current_libdirs $libdir" ;;
5414+ esac
5415+ else
5416+ # Note the libdir as a future libdir.
5417+ case "$future_libdirs " in
5418+ *" $libdir "*) ;;
5419+ *) future_libdirs="$future_libdirs $libdir" ;;
5420+ esac
5421+ fi
5422+
5423+ dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
5424+ test "X$dir" = "X$file/" && dir=
5425+ dir="$dir$objdir"
5426+
5427+ # See the names of the shared library.
5428+ set dummy $library_names
5429+ if test -n "$2"; then
5430+ realname="$2"
5431+ shift
5432+ shift
5433+
5434+ # Install the shared library and build the symlinks.
5435+ $show "$install_prog$stripme $dir/$realname $destdir/$realname"
5436+ $run eval "$install_prog$stripme $dir/$realname $destdir/$realname" || exit $?
5437+
5438+ if test $# -gt 0; then
5439+ # Delete the old symlinks, and create new ones.
5440+ for linkname
5441+ do
5442+ if test "$linkname" != "$realname"; then
5443+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5444+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5445+ fi
5446+ done
5447+ fi
5448+
5449+ # Do each command in the postinstall commands.
5450+ lib="$destdir/$realname"
5451+ eval cmds=\"$postinstall_cmds\"
5452+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5453+ for cmd in $cmds; do
5454+ IFS="$save_ifs"
5455+ $show "$cmd"
5456+ $run eval "$cmd" || exit $?
5457+ done
5458+ IFS="$save_ifs"
5459+ fi
5460+
5461+ # Install the pseudo-library for information purposes.
5462+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5463+ instname="$dir/$name"i
5464+ $show "$install_prog $instname $destdir/$name"
5465+ $run eval "$install_prog $instname $destdir/$name" || exit $?
5466+
5467+ # Maybe install the static library, too.
5468+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
5469+ ;;
5470+
5471+ *.lo)
5472+ # Install (i.e. copy) a libtool object.
5473+
5474+ # Figure out destination file name, if it wasn't already specified.
5475+ if test -n "$destname"; then
5476+ destfile="$destdir/$destname"
5477+ else
5478+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5479+ destfile="$destdir/$destfile"
5480+ fi
5481+
5482+ # Deduce the name of the destination old-style object file.
5483+ case "$destfile" in
5484+ *.lo)
5485+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5486+ ;;
5487+ *.o | *.obj)
5488+ staticdest="$destfile"
5489+ destfile=
5490+ ;;
5491+ *)
5492+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5493+ $echo "$help" 1>&2
5494+ exit 1
5495+ ;;
5496+ esac
5497+
5498+ # Install the libtool object if requested.
5499+ if test -n "$destfile"; then
5500+ $show "$install_prog $file $destfile"
5501+ $run eval "$install_prog $file $destfile" || exit $?
5502+ fi
5503+
5504+ # Install the old object if enabled.
5505+ if test "$build_old_libs" = yes; then
5506+ # Deduce the name of the old-style object file.
5507+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
5508+
5509+ $show "$install_prog $staticobj $staticdest"
5510+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
5511+ fi
5512+ exit 0
5513+ ;;
5514+
5515+ *)
5516+ # Figure out destination file name, if it wasn't already specified.
5517+ if test -n "$destname"; then
5518+ destfile="$destdir/$destname"
5519+ else
5520+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5521+ destfile="$destdir/$destfile"
5522+ fi
5523+
5524+ # Do a test to see if this is really a libtool program.
5525+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5526+ link_against_libtool_libs=
5527+ relink_command=
5528+
5529+ # If there is no directory component, then add one.
5530+ case "$file" in
5531+ */* | *\\*) . $file ;;
5532+ *) . ./$file ;;
5533+ esac
5534+
5535+ # Check the variables that should have been set.
5536+ if test -z "$link_against_libtool_libs"; then
5537+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
5538+ exit 1
5539+ fi
5540+
5541+ finalize=yes
5542+ for lib in $link_against_libtool_libs; do
5543+ # Check to see that each library is installed.
5544+ libdir=
5545+ if test -f "$lib"; then
5546+ # If there is no directory component, then add one.
5547+ case "$lib" in
5548+ */* | *\\*) . $lib ;;
5549+ *) . ./$lib ;;
5550+ esac
5551+ fi
5552+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
5553+ if test -n "$libdir" && test ! -f "$libfile"; then
5554+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
5555+ finalize=no
5556+ fi
5557+ done
5558+
5559+ outputname=
5560+ if test "$fast_install" = no && test -n "$relink_command"; then
5561+ if test "$finalize" = yes && test -z "$run"; then
5562+ tmpdir="/tmp"
5563+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
5564+ tmpdir="$tmpdir/libtool-$$"
5565+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
5566+ else
5567+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
5568+ continue
5569+ fi
5570+ outputname="$tmpdir/$file"
5571+ # Replace the output file specification.
5572+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
5573+
5574+ $show "$relink_command"
5575+ if $run eval "$relink_command"; then :
5576+ else
5577+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5578+ ${rm}r "$tmpdir"
5579+ continue
5580+ fi
5581+ file="$outputname"
5582+ else
5583+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
5584+ fi
5585+ else
5586+ # Install the binary that we compiled earlier.
5587+ file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
5588+ fi
5589+ fi
5590+
5591+ $show "$install_prog$stripme $file $destfile"
5592+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
5593+ test -n "$outputname" && ${rm}r "$tmpdir"
5594+ ;;
5595+ esac
5596+ done
5597+
5598+ for file in $staticlibs; do
5599+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5600+
5601+ # Set up the ranlib parameters.
5602+ oldlib="$destdir/$name"
5603+
5604+ $show "$install_prog $file $oldlib"
5605+ $run eval "$install_prog \$file \$oldlib" || exit $?
5606+
5607+ # Do each command in the postinstall commands.
5608+ eval cmds=\"$old_postinstall_cmds\"
5609+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5610+ for cmd in $cmds; do
5611+ IFS="$save_ifs"
5612+ $show "$cmd"
5613+ $run eval "$cmd" || exit $?
5614+ done
5615+ IFS="$save_ifs"
5616+ done
5617+
5618+ if test -n "$future_libdirs"; then
5619+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
5620+ fi
5621+
5622+ if test -n "$current_libdirs"; then
5623+ # Maybe just do a dry run.
5624+ test -n "$run" && current_libdirs=" -n$current_libdirs"
5625+ exec $SHELL $0 --finish$current_libdirs
5626+ exit 1
5627+ fi
5628+
5629+ exit 0
5630+ ;;
5631+
5632+ # libtool finish mode
5633+ finish)
5634+ modename="$modename: finish"
5635+ libdirs="$nonopt"
5636+ admincmds=
5637+
5638+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
5639+ for dir
5640+ do
5641+ libdirs="$libdirs $dir"
5642+ done
5643+
5644+ for libdir in $libdirs; do
5645+ if test -n "$finish_cmds"; then
5646+ # Do each command in the finish commands.
5647+ eval cmds=\"$finish_cmds\"
5648+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5649+ for cmd in $cmds; do
5650+ IFS="$save_ifs"
5651+ $show "$cmd"
5652+ $run eval "$cmd" || admincmds="$admincmds
5653+ $cmd"
5654+ done
5655+ IFS="$save_ifs"
5656+ fi
5657+ if test -n "$finish_eval"; then
5658+ # Do the single finish_eval.
5659+ eval cmds=\"$finish_eval\"
5660+ $run eval "$cmds" || admincmds="$admincmds
5661+ $cmds"
5662+ fi
5663+ done
5664+ fi
5665+
5666+ # Exit here if they wanted silent mode.
5667+ test "$show" = : && exit 0
5668+
5669+ echo "----------------------------------------------------------------------"
5670+ echo "Libraries have been installed in:"
5671+ for libdir in $libdirs; do
5672+ echo " $libdir"
5673+ done
5674+ echo
5675+ echo "If you ever happen to want to link against installed libraries"
5676+ echo "in a given directory, LIBDIR, you must either use libtool, and"
5677+ echo "specify the full pathname of the library, or use \`-LLIBDIR'"
5678+ echo "flag during linking and do at least one of the following:"
5679+ if test -n "$shlibpath_var"; then
5680+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
5681+ echo " during execution"
5682+ fi
5683+ if test -n "$runpath_var"; then
5684+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
5685+ echo " during linking"
5686+ fi
5687+ if test -n "$hardcode_libdir_flag_spec"; then
5688+ libdir=LIBDIR
5689+ eval flag=\"$hardcode_libdir_flag_spec\"
5690+
5691+ echo " - use the \`$flag' linker flag"
5692+ fi
5693+ if test -n "$admincmds"; then
5694+ echo " - have your system administrator run these commands:$admincmds"
5695+ fi
5696+ if test -f /etc/ld.so.conf; then
5697+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
5698+ fi
5699+ echo
5700+ echo "See any operating system documentation about shared libraries for"
5701+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
5702+ echo "----------------------------------------------------------------------"
5703+ exit 0
5704+ ;;
5705+
5706+ # libtool execute mode
5707+ execute)
5708+ modename="$modename: execute"
5709+
5710+ # The first argument is the command name.
5711+ cmd="$nonopt"
5712+ if test -z "$cmd"; then
5713+ $echo "$modename: you must specify a COMMAND" 1>&2
5714+ $echo "$help"
5715+ exit 1
5716+ fi
5717+
5718+ # Handle -dlopen flags immediately.
5719+ for file in $execute_dlfiles; do
5720+ if test ! -f "$file"; then
5721+ $echo "$modename: \`$file' is not a file" 1>&2
5722+ $echo "$help" 1>&2
5723+ exit 1
5724+ fi
5725+
5726+ dir=
5727+ case "$file" in
5728+ *.la)
5729+ # Check to see that this really is a libtool archive.
5730+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5731+ else
5732+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5733+ $echo "$help" 1>&2
5734+ exit 1
5735+ fi
5736+
5737+ # Read the libtool library.
5738+ dlname=
5739+ library_names=
5740+
5741+ # If there is no directory component, then add one.
5742+ case "$file" in
5743+ */* | *\\*) . $file ;;
5744+ *) . ./$file ;;
5745+ esac
5746+
5747+ # Skip this library if it cannot be dlopened.
5748+ if test -z "$dlname"; then
5749+ # Warn if it was a shared library.
5750+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
5751+ continue
5752+ fi
5753+
5754+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5755+ test "X$dir" = "X$file" && dir=.
5756+
5757+ if test -f "$dir/$objdir/$dlname"; then
5758+ dir="$dir/$objdir"
5759+ else
5760+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
5761+ exit 1
5762+ fi
5763+ ;;
5764+
5765+ *.lo)
5766+ # Just add the directory containing the .lo file.
5767+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5768+ test "X$dir" = "X$file" && dir=.
5769+ ;;
5770+
5771+ *)
5772+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
5773+ continue
5774+ ;;
5775+ esac
5776+
5777+ # Get the absolute pathname.
5778+ absdir=`cd "$dir" && pwd`
5779+ test -n "$absdir" && dir="$absdir"
5780+
5781+ # Now add the directory to shlibpath_var.
5782+ if eval "test -z \"\$$shlibpath_var\""; then
5783+ eval "$shlibpath_var=\"\$dir\""
5784+ else
5785+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
5786+ fi
5787+ done
5788+
5789+ # This variable tells wrapper scripts just to set shlibpath_var
5790+ # rather than running their programs.
5791+ libtool_execute_magic="$magic"
5792+
5793+ # Check if any of the arguments is a wrapper script.
5794+ args=
5795+ for file
5796+ do
5797+ case "$file" in
5798+ -*) ;;
5799+ *)
5800+ # Do a test to see if this is really a libtool program.
5801+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5802+ # If there is no directory component, then add one.
5803+ case "$file" in
5804+ */* | *\\*) . $file ;;
5805+ *) . ./$file ;;
5806+ esac
5807+
5808+ # Transform arg to wrapped name.
5809+ file="$progdir/$program"
5810+ fi
5811+ ;;
5812+ esac
5813+ # Quote arguments (to preserve shell metacharacters).
5814+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
5815+ args="$args \"$file\""
5816+ done
5817+
5818+ if test -z "$run"; then
5819+ # Export the shlibpath_var.
5820+ eval "export $shlibpath_var"
5821+
5822+ # Restore saved enviroment variables
5823+ if test "${save_LC_ALL+set}" = set; then
5824+ LC_ALL="$save_LC_ALL"; export LC_ALL
5825+ fi
5826+ if test "${save_LANG+set}" = set; then
5827+ LANG="$save_LANG"; export LANG
5828+ fi
5829+
5830+ # Now actually exec the command.
5831+ eval "exec \$cmd$args"
5832+
5833+ $echo "$modename: cannot exec \$cmd$args"
5834+ exit 1
5835+ else
5836+ # Display what would be done.
5837+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
5838+ $echo "export $shlibpath_var"
5839+ $echo "$cmd$args"
5840+ exit 0
5841+ fi
5842+ ;;
5843+
5844+ # libtool uninstall mode
5845+ uninstall)
5846+ modename="$modename: uninstall"
5847+ rm="$nonopt"
5848+ files=
5849+
5850+ for arg
5851+ do
5852+ case "$arg" in
5853+ -*) rm="$rm $arg" ;;
5854+ *) files="$files $arg" ;;
5855+ esac
5856+ done
5857+
5858+ if test -z "$rm"; then
5859+ $echo "$modename: you must specify an RM program" 1>&2
5860+ $echo "$help" 1>&2
5861+ exit 1
5862+ fi
5863+
5864+ for file in $files; do
5865+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
5866+ test "X$dir" = "X$file" && dir=.
5867+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5868+
5869+ rmfiles="$file"
5870+
5871+ case "$name" in
5872+ *.la)
5873+ # Possibly a libtool archive, so verify it.
5874+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
5875+ . $dir/$name
5876+
5877+ # Delete the libtool libraries and symlinks.
5878+ for n in $library_names; do
5879+ rmfiles="$rmfiles $dir/$n"
5880+ done
5881+ test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
5882+
5883+ $show "$rm $rmfiles"
5884+ $run $rm $rmfiles
5885+
5886+ if test -n "$library_names"; then
5887+ # Do each command in the postuninstall commands.
5888+ eval cmds=\"$postuninstall_cmds\"
5889+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5890+ for cmd in $cmds; do
5891+ IFS="$save_ifs"
5892+ $show "$cmd"
5893+ $run eval "$cmd"
5894+ done
5895+ IFS="$save_ifs"
5896+ fi
5897+
5898+ if test -n "$old_library"; then
5899+ # Do each command in the old_postuninstall commands.
5900+ eval cmds=\"$old_postuninstall_cmds\"
5901+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
5902+ for cmd in $cmds; do
5903+ IFS="$save_ifs"
5904+ $show "$cmd"
5905+ $run eval "$cmd"
5906+ done
5907+ IFS="$save_ifs"
5908+ fi
5909+
5910+ # FIXME: should reinstall the best remaining shared library.
5911+ fi
5912+ ;;
5913+
5914+ *.lo)
5915+ if test "$build_old_libs" = yes; then
5916+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
5917+ rmfiles="$rmfiles $dir/$oldobj"
5918+ fi
5919+ $show "$rm $rmfiles"
5920+ $run $rm $rmfiles
5921+ ;;
5922+
5923+ *)
5924+ $show "$rm $rmfiles"
5925+ $run $rm $rmfiles
5926+ ;;
5927+ esac
5928+ done
5929+ exit 0
5930+ ;;
5931+
5932+ "")
5933+ $echo "$modename: you must specify a MODE" 1>&2
5934+ $echo "$generic_help" 1>&2
5935+ exit 1
5936+ ;;
5937+ esac
5938+
5939+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
5940+ $echo "$generic_help" 1>&2
5941+ exit 1
5942+fi # test -z "$show_help"
5943+
5944+# We need to display help for each of the modes.
5945+case "$mode" in
5946+"") $echo \
5947+"Usage: $modename [OPTION]... [MODE-ARG]...
5948+
5949+Provide generalized library-building support services.
5950+
5951+ --config show all configuration variables
5952+ --debug enable verbose shell tracing
5953+-n, --dry-run display commands without modifying any files
5954+ --features display basic configuration information and exit
5955+ --finish same as \`--mode=finish'
5956+ --help display this help message and exit
5957+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
5958+ --quiet same as \`--silent'
5959+ --silent don't print informational messages
5960+ --version print version information
5961+
5962+MODE must be one of the following:
5963+
5964+ compile compile a source file into a libtool object
5965+ execute automatically set library path, then run a program
5966+ finish complete the installation of libtool libraries
5967+ install install libraries or executables
5968+ link create a library or an executable
5969+ uninstall remove libraries from an installed directory
5970+
5971+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
5972+a more detailed description of MODE."
5973+ exit 0
5974+ ;;
5975+
5976+compile)
5977+ $echo \
5978+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
5979+
5980+Compile a source file into a libtool library object.
5981+
5982+This mode accepts the following additional options:
5983+
5984+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
5985+ -static always build a \`.o' file suitable for static linking
5986+
5987+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
5988+from the given SOURCEFILE.
5989+
5990+The output file name is determined by removing the directory component from
5991+SOURCEFILE, then substituting the C source code suffix \`.c' with the
5992+library object suffix, \`.lo'."
5993+ ;;
5994+
5995+execute)
5996+ $echo \
5997+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
5998+
5999+Automatically set library path, then run a program.
6000+
6001+This mode accepts the following additional options:
6002+
6003+ -dlopen FILE add the directory containing FILE to the library path
6004+
6005+This mode sets the library path environment variable according to \`-dlopen'
6006+flags.
6007+
6008+If any of the ARGS are libtool executable wrappers, then they are translated
6009+into their corresponding uninstalled binary, and any of their required library
6010+directories are added to the library path.
6011+
6012+Then, COMMAND is executed, with ARGS as arguments."
6013+ ;;
6014+
6015+finish)
6016+ $echo \
6017+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6018+
6019+Complete the installation of libtool libraries.
6020+
6021+Each LIBDIR is a directory that contains libtool libraries.
6022+
6023+The commands that this mode executes may require superuser privileges. Use
6024+the \`--dry-run' option if you just want to see what would be executed."
6025+ ;;
6026+
6027+install)
6028+ $echo \
6029+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6030+
6031+Install executables or libraries.
6032+
6033+INSTALL-COMMAND is the installation command. The first component should be
6034+either the \`install' or \`cp' program.
6035+
6036+The rest of the components are interpreted as arguments to that command (only
6037+BSD-compatible install options are recognized)."
6038+ ;;
6039+
6040+link)
6041+ $echo \
6042+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6043+
6044+Link object files or libraries together to form another library, or to
6045+create an executable program.
6046+
6047+LINK-COMMAND is a command using the C compiler that you would use to create
6048+a program from several object files.
6049+
6050+The following components of LINK-COMMAND are treated specially:
6051+
6052+ -all-static do not do any dynamic linking at all
6053+ -avoid-version do not add a version suffix if possible
6054+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6055+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6056+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6057+ -export-symbols SYMFILE
6058+ try to export only the symbols listed in SYMFILE
6059+ -export-symbols-regex REGEX
6060+ try to export only the symbols matching REGEX
6061+ -LLIBDIR search LIBDIR for required installed libraries
6062+ -lNAME OUTPUT-FILE requires the installed library libNAME
6063+ -module build a library that can dlopened
6064+ -no-undefined declare that a library does not refer to external symbols
6065+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6066+ -release RELEASE specify package release information
6067+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
6068+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6069+ -static do not do any dynamic linking of libtool libraries
6070+ -version-info CURRENT[:REVISION[:AGE]]
6071+ specify library version info [each variable defaults to 0]
6072+
6073+All other options (arguments beginning with \`-') are ignored.
6074+
6075+Every other argument is treated as a filename. Files ending in \`.la' are
6076+treated as uninstalled libtool libraries, other files are standard or library
6077+object files.
6078+
6079+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6080+only library objects (\`.lo' files) may be specified, and \`-rpath' is
6081+required, except when creating a convenience library.
6082+
6083+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6084+using \`ar' and \`ranlib', or on Windows using \`lib'.
6085+
6086+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6087+is created, otherwise an executable program is created."
6088+ ;;
6089+
6090+uninstall)
6091+ $echo \
6092+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6093+
6094+Remove libraries from an installation directory.
6095+
6096+RM is the name of the program to use to delete files associated with each FILE
6097+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6098+to RM.
6099+
6100+If FILE is a libtool library, all the files associated with it are deleted.
6101+Otherwise, only FILE itself is deleted using RM."
6102+ ;;
6103+
6104+*)
6105+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
6106+ $echo "$help" 1>&2
6107+ exit 1
6108+ ;;
6109+esac
6110+
6111+echo
6112+$echo "Try \`$modename --help' for more information about other modes."
6113+
6114+exit 0
6115+
6116+# Local Variables:
6117+# mode:shell-script
6118+# sh-indentation:2
6119+# End:
6120--- /dev/null 1879--- /dev/null
6121+++ jpeg-6b/testimg.uu 1880+++ jpeg-6b/testimg.uu
6122@@ -0,0 +1,873 @@ 1881@@ -0,0 +1,873 @@
@@ -6993,3022 +2752,3 @@
6993+JVO-KSZ\]>_;LV;-G#[X!?RY<N/!GP"]\:_#ARS+@SQ%@`WZM6;,F(``[ 2752+JVO-KSZ\]>_;LV;-G#[X!?RY<N/!GP"]\:_#ARS+@SQ%@`WZM6;,F(``[
6994+` 2753+`
6995+end 2754+end
6996--- /dev/null
6997+++ jpeg-6b/ltconfig.new
6998@@ -0,0 +1,3016 @@
6999+#! /bin/sh
7000+
7001+# ltconfig - Create a system-specific libtool.
7002+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
7003+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7004+#
7005+# This file is free software; you can redistribute it and/or modify it
7006+# under the terms of the GNU General Public License as published by
7007+# the Free Software Foundation; either version 2 of the License, or
7008+# (at your option) any later version.
7009+#
7010+# This program is distributed in the hope that it will be useful, but
7011+# WITHOUT ANY WARRANTY; without even the implied warranty of
7012+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7013+# General Public License for more details.
7014+#
7015+# You should have received a copy of the GNU General Public License
7016+# along with this program; if not, write to the Free Software
7017+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7018+#
7019+# As a special exception to the GNU General Public License, if you
7020+# distribute this file as part of a program that contains a
7021+# configuration script generated by Autoconf, you may include it under
7022+# the same distribution terms that you use for the rest of that program.
7023+
7024+# A lot of this script is taken from autoconf-2.10.
7025+
7026+# Check that we are running under the correct shell.
7027+SHELL=${CONFIG_SHELL-/bin/sh}
7028+echo=echo
7029+if test "X$1" = X--no-reexec; then
7030+ # Discard the --no-reexec flag, and continue.
7031+ shift
7032+elif test "X$1" = X--fallback-echo; then
7033+ # Avoid inline document here, it may be left over
7034+ :
7035+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
7036+ # Yippee, $echo works!
7037+ :
7038+else
7039+ # Restart under the correct shell.
7040+ exec "$SHELL" "$0" --no-reexec ${1+"$@"}
7041+fi
7042+
7043+if test "X$1" = X--fallback-echo; then
7044+ # used as fallback echo
7045+ shift
7046+ cat <<EOF
7047+$*
7048+EOF
7049+ exit 0
7050+fi
7051+
7052+# Find the correct PATH separator. Usually this is `:', but
7053+# DJGPP uses `;' like DOS.
7054+if test "X${PATH_SEPARATOR+set}" != "Xset"; then
7055+ UNAME=${UNAME-`uname 2>/dev/null`}
7056+ case X$UNAME in
7057+ *-DOS) PATH_SEPARATOR=';' ;;
7058+ *) PATH_SEPARATOR=':' ;;
7059+ esac
7060+fi
7061+
7062+# The HP-UX ksh and POSIX shell print the target directory to stdout
7063+# if CDPATH is set.
7064+if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
7065+
7066+if test "X${echo_test_string+set}" != "Xset"; then
7067+ # find a string as large as possible, as long as the shell can cope with it
7068+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
7069+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
7070+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
7071+ echo_test_string="`eval $cmd`" &&
7072+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
7073+ break
7074+ fi
7075+ done
7076+fi
7077+
7078+if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
7079+ test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
7080+ # The Solaris, AIX, and Digital Unix default echo programs unquote
7081+ # backslashes. This makes it impossible to quote backslashes using
7082+ # echo "$something" | sed 's/\\/\\\\/g'
7083+ #
7084+ # So, first we look for a working echo in the user's PATH.
7085+
7086+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7087+ for dir in $PATH /usr/ucb; do
7088+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
7089+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
7090+ test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
7091+ echo="$dir/echo"
7092+ break
7093+ fi
7094+ done
7095+ IFS="$save_ifs"
7096+
7097+ if test "X$echo" = Xecho; then
7098+ # We didn't find a better echo, so look for alternatives.
7099+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
7100+ test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
7101+ # This shell has a builtin print -r that does the trick.
7102+ echo='print -r'
7103+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
7104+ test "X$CONFIG_SHELL" != X/bin/ksh; then
7105+ # If we have ksh, try running ltconfig again with it.
7106+ ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
7107+ export ORIGINAL_CONFIG_SHELL
7108+ CONFIG_SHELL=/bin/ksh
7109+ export CONFIG_SHELL
7110+ exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
7111+ else
7112+ # Try using printf.
7113+ echo='printf "%s\n"'
7114+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
7115+ test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
7116+ # Cool, printf works
7117+ :
7118+ elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
7119+ test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
7120+ CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
7121+ export CONFIG_SHELL
7122+ SHELL="$CONFIG_SHELL"
7123+ export SHELL
7124+ echo="$CONFIG_SHELL $0 --fallback-echo"
7125+ elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
7126+ test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
7127+ echo="$CONFIG_SHELL $0 --fallback-echo"
7128+ else
7129+ # maybe with a smaller string...
7130+ prev=:
7131+
7132+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
7133+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
7134+ break
7135+ fi
7136+ prev="$cmd"
7137+ done
7138+
7139+ if test "$prev" != 'sed 50q "$0"'; then
7140+ echo_test_string=`eval $prev`
7141+ export echo_test_string
7142+ exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
7143+ else
7144+ # Oops. We lost completely, so just stick with echo.
7145+ echo=echo
7146+ fi
7147+ fi
7148+ fi
7149+ fi
7150+fi
7151+
7152+# Sed substitution that helps us do robust quoting. It backslashifies
7153+# metacharacters that are still active within double-quoted strings.
7154+Xsed='sed -e s/^X//'
7155+sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7156+
7157+# Same as above, but do not quote variable references.
7158+double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7159+
7160+# Sed substitution to delay expansion of an escaped shell variable in a
7161+# double_quote_subst'ed string.
7162+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7163+
7164+# The name of this program.
7165+progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
7166+
7167+# Constants:
7168+PROGRAM=ltconfig
7169+PACKAGE=libtool
7170+VERSION=1.3.3
7171+TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
7172+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
7173+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
7174+rm="rm -f"
7175+
7176+help="Try \`$progname --help' for more information."
7177+
7178+# Global variables:
7179+default_ofile=libtool
7180+can_build_shared=yes
7181+enable_shared=yes
7182+# All known linkers require a `.a' archive for static linking (except M$VC,
7183+# which needs '.lib').
7184+enable_static=yes
7185+enable_fast_install=yes
7186+enable_dlopen=unknown
7187+enable_win32_dll=no
7188+ltmain=
7189+silent=
7190+srcdir=
7191+ac_config_guess=
7192+ac_config_sub=
7193+host=
7194+nonopt=
7195+ofile="$default_ofile"
7196+verify_host=yes
7197+with_gcc=no
7198+with_gnu_ld=no
7199+need_locks=yes
7200+ac_ext=c
7201+objext=o
7202+libext=a
7203+exeext=
7204+cache_file=
7205+
7206+old_AR="$AR"
7207+old_CC="$CC"
7208+old_CFLAGS="$CFLAGS"
7209+old_CPPFLAGS="$CPPFLAGS"
7210+old_LDFLAGS="$LDFLAGS"
7211+old_LD="$LD"
7212+old_LN_S="$LN_S"
7213+old_LIBS="$LIBS"
7214+old_NM="$NM"
7215+old_RANLIB="$RANLIB"
7216+old_DLLTOOL="$DLLTOOL"
7217+old_OBJDUMP="$OBJDUMP"
7218+old_AS="$AS"
7219+
7220+# Parse the command line options.
7221+args=
7222+prev=
7223+for option
7224+do
7225+ case "$option" in
7226+ -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
7227+ *) optarg= ;;
7228+ esac
7229+
7230+ # If the previous option needs an argument, assign it.
7231+ if test -n "$prev"; then
7232+ eval "$prev=\$option"
7233+ prev=
7234+ continue
7235+ fi
7236+
7237+ case "$option" in
7238+ --help) cat <<EOM
7239+Usage: $progname [OPTION]... [HOST [LTMAIN]]
7240+
7241+Generate a system-specific libtool script.
7242+
7243+ --debug enable verbose shell tracing
7244+ --disable-shared do not build shared libraries
7245+ --disable-static do not build static libraries
7246+ --disable-fast-install do not optimize for fast installation
7247+ --enable-dlopen enable dlopen support
7248+ --enable-win32-dll enable building dlls on win32 hosts
7249+ --help display this help and exit
7250+ --no-verify do not verify that HOST is a valid host type
7251+-o, --output=FILE specify the output file [default=$default_ofile]
7252+ --quiet same as \`--silent'
7253+ --silent do not print informational messages
7254+ --srcdir=DIR find \`config.guess' in DIR
7255+ --version output version information and exit
7256+ --with-gcc assume that the GNU C compiler will be used
7257+ --with-gnu-ld assume that the C compiler uses the GNU linker
7258+ --disable-lock disable file locking
7259+ --cache-file=FILE configure cache file
7260+
7261+LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
7262+that provides basic libtool functionality.
7263+
7264+HOST is the canonical host system name [default=guessed].
7265+EOM
7266+ exit 0
7267+ ;;
7268+
7269+ --debug)
7270+ echo "$progname: enabling shell trace mode"
7271+ set -x
7272+ ;;
7273+
7274+ --disable-shared) enable_shared=no ;;
7275+
7276+ --disable-static) enable_static=no ;;
7277+
7278+ --disable-fast-install) enable_fast_install=no ;;
7279+
7280+ --enable-dlopen) enable_dlopen=yes ;;
7281+
7282+ --enable-win32-dll) enable_win32_dll=yes ;;
7283+
7284+ --quiet | --silent) silent=yes ;;
7285+
7286+ --srcdir) prev=srcdir ;;
7287+ --srcdir=*) srcdir="$optarg" ;;
7288+
7289+ --no-verify) verify_host=no ;;
7290+
7291+ --output | -o) prev=ofile ;;
7292+ --output=*) ofile="$optarg" ;;
7293+
7294+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
7295+
7296+ --with-gcc) with_gcc=yes ;;
7297+ --with-gnu-ld) with_gnu_ld=yes ;;
7298+
7299+ --disable-lock) need_locks=no ;;
7300+
7301+ --cache-file=*) cache_file="$optarg" ;;
7302+
7303+ -*)
7304+ echo "$progname: unrecognized option \`$option'" 1>&2
7305+ echo "$help" 1>&2
7306+ exit 1
7307+ ;;
7308+
7309+ *)
7310+ if test -z "$ltmain"; then
7311+ ltmain="$option"
7312+ elif test -z "$host"; then
7313+# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
7314+# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
7315+# echo "$progname: warning \`$option' is not a valid host type" 1>&2
7316+# fi
7317+ host="$option"
7318+ else
7319+ echo "$progname: too many arguments" 1>&2
7320+ echo "$help" 1>&2
7321+ exit 1
7322+ fi ;;
7323+ esac
7324+done
7325+
7326+if test -z "$ltmain"; then
7327+ echo "$progname: you must specify a LTMAIN file" 1>&2
7328+ echo "$help" 1>&2
7329+ exit 1
7330+fi
7331+
7332+if test ! -f "$ltmain"; then
7333+ echo "$progname: \`$ltmain' does not exist" 1>&2
7334+ echo "$help" 1>&2
7335+ exit 1
7336+fi
7337+
7338+# Quote any args containing shell metacharacters.
7339+ltconfig_args=
7340+for arg
7341+do
7342+ case "$arg" in
7343+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
7344+ ltconfig_args="$ltconfig_args '$arg'" ;;
7345+ *) ltconfig_args="$ltconfig_args $arg" ;;
7346+ esac
7347+done
7348+
7349+# A relevant subset of AC_INIT.
7350+
7351+# File descriptor usage:
7352+# 0 standard input
7353+# 1 file creation
7354+# 2 errors and warnings
7355+# 3 some systems may open it to /dev/tty
7356+# 4 used on the Kubota Titan
7357+# 5 compiler messages saved in config.log
7358+# 6 checking for... messages and results
7359+if test "$silent" = yes; then
7360+ exec 6>/dev/null
7361+else
7362+ exec 6>&1
7363+fi
7364+exec 5>>./config.log
7365+
7366+# NLS nuisances.
7367+# Only set LANG and LC_ALL to C if already set.
7368+# These must not be set unconditionally because not all systems understand
7369+# e.g. LANG=C (notably SCO).
7370+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
7371+if test "${LANG+set}" = set; then LANG=C; export LANG; fi
7372+
7373+if test -n "$cache_file" && test -r "$cache_file"; then
7374+ echo "loading cache $cache_file within ltconfig"
7375+ . $cache_file
7376+fi
7377+
7378+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
7379+ # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
7380+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
7381+ ac_n= ac_c='
7382+' ac_t=' '
7383+ else
7384+ ac_n=-n ac_c= ac_t=
7385+ fi
7386+else
7387+ ac_n= ac_c='\c' ac_t=
7388+fi
7389+
7390+if test -z "$srcdir"; then
7391+ # Assume the source directory is the same one as the path to LTMAIN.
7392+ srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
7393+ test "$srcdir" = "$ltmain" && srcdir=.
7394+fi
7395+
7396+trap "$rm conftest*; exit 1" 1 2 15
7397+if test "$verify_host" = yes; then
7398+ # Check for config.guess and config.sub.
7399+ ac_aux_dir=
7400+ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
7401+ if test -f $ac_dir/config.guess; then
7402+ ac_aux_dir=$ac_dir
7403+ break
7404+ fi
7405+ done
7406+ if test -z "$ac_aux_dir"; then
7407+ echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
7408+ echo "$help" 1>&2
7409+ exit 1
7410+ fi
7411+ ac_config_guess=$ac_aux_dir/config.guess
7412+ ac_config_sub=$ac_aux_dir/config.sub
7413+
7414+ # Make sure we can run config.sub.
7415+ if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
7416+ else
7417+ echo "$progname: cannot run $ac_config_sub" 1>&2
7418+ echo "$help" 1>&2
7419+ exit 1
7420+ fi
7421+
7422+ echo $ac_n "checking host system type""... $ac_c" 1>&6
7423+
7424+ host_alias=$host
7425+ case "$host_alias" in
7426+ "")
7427+ if host_alias=`$SHELL $ac_config_guess`; then :
7428+ else
7429+ echo "$progname: cannot guess host type; you must specify one" 1>&2
7430+ echo "$help" 1>&2
7431+ exit 1
7432+ fi ;;
7433+ esac
7434+ host=`$SHELL $ac_config_sub $host_alias`
7435+ echo "$ac_t$host" 1>&6
7436+
7437+ # Make sure the host verified.
7438+ test -z "$host" && exit 1
7439+
7440+elif test -z "$host"; then
7441+ echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
7442+ echo "$help" 1>&2
7443+ exit 1
7444+else
7445+ host_alias=$host
7446+fi
7447+
7448+# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
7449+case "$host_os" in
7450+linux-gnu*) ;;
7451+linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
7452+esac
7453+
7454+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
7455+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
7456+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
7457+
7458+case "$host_os" in
7459+aix3*)
7460+ # AIX sometimes has problems with the GCC collect2 program. For some
7461+ # reason, if we set the COLLECT_NAMES environment variable, the problems
7462+ # vanish in a puff of smoke.
7463+ if test "${COLLECT_NAMES+set}" != set; then
7464+ COLLECT_NAMES=
7465+ export COLLECT_NAMES
7466+ fi
7467+ ;;
7468+esac
7469+
7470+# Determine commands to create old-style static archives.
7471+old_archive_cmds='$AR cru $oldlib$oldobjs'
7472+old_postinstall_cmds='chmod 644 $oldlib'
7473+old_postuninstall_cmds=
7474+
7475+# Set a sane default for `AR'.
7476+test -z "$AR" && AR=ar
7477+
7478+# Set a sane default for `OBJDUMP'.
7479+test -z "$OBJDUMP" && OBJDUMP=objdump
7480+
7481+# If RANLIB is not set, then run the test.
7482+if test "${RANLIB+set}" != "set"; then
7483+ result=no
7484+
7485+ echo $ac_n "checking for ranlib... $ac_c" 1>&6
7486+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7487+ for dir in $PATH; do
7488+ test -z "$dir" && dir=.
7489+ if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
7490+ RANLIB="ranlib"
7491+ result="ranlib"
7492+ break
7493+ fi
7494+ done
7495+ IFS="$save_ifs"
7496+
7497+ echo "$ac_t$result" 1>&6
7498+fi
7499+
7500+if test -n "$RANLIB"; then
7501+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7502+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
7503+fi
7504+
7505+# Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
7506+test -z "$DLLTOOL" && DLLTOOL=dlltool
7507+test -z "$OBJDUMP" && OBJDUMP=objdump
7508+test -z "$AS" && AS=as
7509+
7510+# Check to see if we are using GCC.
7511+if test "$with_gcc" != yes || test -z "$CC"; then
7512+ # If CC is not set, then try to find GCC or a usable CC.
7513+ if test -z "$CC"; then
7514+ echo $ac_n "checking for gcc... $ac_c" 1>&6
7515+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7516+ for dir in $PATH; do
7517+ test -z "$dir" && dir=.
7518+ if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
7519+ CC="gcc"
7520+ break
7521+ fi
7522+ done
7523+ IFS="$save_ifs"
7524+
7525+ if test -n "$CC"; then
7526+ echo "$ac_t$CC" 1>&6
7527+ else
7528+ echo "$ac_t"no 1>&6
7529+ fi
7530+ fi
7531+
7532+ # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
7533+ if test -z "$CC"; then
7534+ echo $ac_n "checking for cc... $ac_c" 1>&6
7535+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7536+ cc_rejected=no
7537+ for dir in $PATH; do
7538+ test -z "$dir" && dir=.
7539+ if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
7540+ if test "$dir/cc" = "/usr/ucb/cc"; then
7541+ cc_rejected=yes
7542+ continue
7543+ fi
7544+ CC="cc"
7545+ break
7546+ fi
7547+ done
7548+ IFS="$save_ifs"
7549+ if test $cc_rejected = yes; then
7550+ # We found a bogon in the path, so make sure we never use it.
7551+ set dummy $CC
7552+ shift
7553+ if test $# -gt 0; then
7554+ # We chose a different compiler from the bogus one.
7555+ # However, it has the same name, so the bogon will be chosen
7556+ # first if we set CC to just the name; use the full file name.
7557+ shift
7558+ set dummy "$dir/cc" "$@"
7559+ shift
7560+ CC="$@"
7561+ fi
7562+ fi
7563+
7564+ if test -n "$CC"; then
7565+ echo "$ac_t$CC" 1>&6
7566+ else
7567+ echo "$ac_t"no 1>&6
7568+ fi
7569+
7570+ if test -z "$CC"; then
7571+ echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
7572+ exit 1
7573+ fi
7574+ fi
7575+
7576+ # Now see if the compiler is really GCC.
7577+ with_gcc=no
7578+ echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
7579+ echo "$progname:581: checking whether we are using GNU C" >&5
7580+
7581+ $rm conftest.c
7582+ cat > conftest.c <<EOF
7583+#ifdef __GNUC__
7584+ yes;
7585+#endif
7586+EOF
7587+ if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
7588+ with_gcc=yes
7589+ fi
7590+ $rm conftest.c
7591+ echo "$ac_t$with_gcc" 1>&6
7592+fi
7593+
7594+# Allow CC to be a program name with arguments.
7595+set dummy $CC
7596+compiler="$2"
7597+
7598+echo $ac_n "checking for object suffix... $ac_c" 1>&6
7599+$rm conftest*
7600+echo 'int i = 1;' > conftest.c
7601+echo "$progname:603: checking for object suffix" >& 5
7602+if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
7603+ # Append any warnings to the config.log.
7604+ cat conftest.err 1>&5
7605+
7606+ for ac_file in conftest.*; do
7607+ case $ac_file in
7608+ *.c) ;;
7609+ *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
7610+ esac
7611+ done
7612+else
7613+ cat conftest.err 1>&5
7614+ echo "$progname: failed program was:" >&5
7615+ cat conftest.c >&5
7616+fi
7617+$rm conftest*
7618+echo "$ac_t$objext" 1>&6
7619+
7620+echo $ac_n "checking for executable suffix... $ac_c" 1>&6
7621+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
7622+ echo $ac_n "(cached) $ac_c" 1>&6
7623+else
7624+ ac_cv_exeext="no"
7625+ $rm conftest*
7626+ echo 'main () { return 0; }' > conftest.c
7627+ echo "$progname:629: checking for executable suffix" >& 5
7628+ if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
7629+ # Append any warnings to the config.log.
7630+ cat conftest.err 1>&5
7631+
7632+ for ac_file in conftest.*; do
7633+ case $ac_file in
7634+ *.c | *.err | *.$objext ) ;;
7635+ *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
7636+ esac
7637+ done
7638+ else
7639+ cat conftest.err 1>&5
7640+ echo "$progname: failed program was:" >&5
7641+ cat conftest.c >&5
7642+ fi
7643+ $rm conftest*
7644+fi
7645+if test "X$ac_cv_exeext" = Xno; then
7646+ exeext=""
7647+else
7648+ exeext="$ac_cv_exeext"
7649+fi
7650+echo "$ac_t$ac_cv_exeext" 1>&6
7651+
7652+echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
7653+pic_flag=
7654+special_shlib_compile_flags=
7655+wl=
7656+link_static_flag=
7657+no_builtin_flag=
7658+
7659+if test "$with_gcc" = yes; then
7660+ wl='-Wl,'
7661+ link_static_flag='-static'
7662+
7663+ case "$host_os" in
7664+ beos* | irix5* | irix6* | osf3* | osf4*)
7665+ # PIC is the default for these OSes.
7666+ ;;
7667+ aix*)
7668+ # Below there is a dirty hack to force normal static linking with -ldl
7669+ # The problem is because libdl dynamically linked with both libc and
7670+ # libC (AIX C++ library), which obviously doesn't included in libraries
7671+ # list by gcc. This cause undefined symbols with -static flags.
7672+ # This hack allows C programs to be linked with "-static -ldl", but
7673+ # we not sure about C++ programs.
7674+ link_static_flag="$link_static_flag ${wl}-lC"
7675+ ;;
7676+ cygwin* | mingw* | os2*)
7677+ # We can build DLLs from non-PIC.
7678+ ;;
7679+ amigaos*)
7680+ # FIXME: we need at least 68020 code to build shared libraries, but
7681+ # adding the `-m68020' flag to GCC prevents building anything better,
7682+ # like `-m68040'.
7683+ pic_flag='-m68020 -resident32 -malways-restore-a4'
7684+ ;;
7685+ sysv4*MP*)
7686+ if test -d /usr/nec; then
7687+ pic_flag=-Kconform_pic
7688+ fi
7689+ ;;
7690+ *)
7691+ pic_flag='-fPIC'
7692+ ;;
7693+ esac
7694+else
7695+ # PORTME Check for PIC flags for the system compiler.
7696+ case "$host_os" in
7697+ aix3* | aix4*)
7698+ # All AIX code is PIC.
7699+ link_static_flag='-bnso -bI:/lib/syscalls.exp'
7700+ ;;
7701+
7702+ hpux9* | hpux10* | hpux11*)
7703+ # Is there a better link_static_flag that works with the bundled CC?
7704+ wl='-Wl,'
7705+ link_static_flag="${wl}-a ${wl}archive"
7706+ pic_flag='+Z'
7707+ ;;
7708+
7709+ irix5* | irix6*)
7710+ wl='-Wl,'
7711+ link_static_flag='-non_shared'
7712+ # PIC (with -KPIC) is the default.
7713+ ;;
7714+
7715+ cygwin* | mingw* | os2*)
7716+ # We can build DLLs from non-PIC.
7717+ ;;
7718+
7719+ osf3* | osf4*)
7720+ # All OSF/1 code is PIC.
7721+ wl='-Wl,'
7722+ link_static_flag='-non_shared'
7723+ ;;
7724+
7725+ sco3.2v5*)
7726+ pic_flag='-Kpic'
7727+ link_static_flag='-dn'
7728+ special_shlib_compile_flags='-belf'
7729+ ;;
7730+
7731+ solaris*)
7732+ pic_flag='-KPIC'
7733+ link_static_flag='-Bstatic'
7734+ wl='-Wl,'
7735+ ;;
7736+
7737+ sunos4*)
7738+ pic_flag='-PIC'
7739+ link_static_flag='-Bstatic'
7740+ wl='-Qoption ld '
7741+ ;;
7742+
7743+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7744+ pic_flag='-KPIC'
7745+ link_static_flag='-Bstatic'
7746+ wl='-Wl,'
7747+ ;;
7748+
7749+ uts4*)
7750+ pic_flag='-pic'
7751+ link_static_flag='-Bstatic'
7752+ ;;
7753+ sysv4*MP*)
7754+ if test -d /usr/nec ;then
7755+ pic_flag='-Kconform_pic'
7756+ link_static_flag='-Bstatic'
7757+ fi
7758+ ;;
7759+ *)
7760+ can_build_shared=no
7761+ ;;
7762+ esac
7763+fi
7764+
7765+if test -n "$pic_flag"; then
7766+ echo "$ac_t$pic_flag" 1>&6
7767+
7768+ # Check to make sure the pic_flag actually works.
7769+ echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
7770+ $rm conftest*
7771+ echo "int some_variable = 0;" > conftest.c
7772+ save_CFLAGS="$CFLAGS"
7773+ CFLAGS="$CFLAGS $pic_flag -DPIC"
7774+ echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
7775+ if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
7776+ # Append any warnings to the config.log.
7777+ cat conftest.err 1>&5
7778+
7779+ case "$host_os" in
7780+ hpux9* | hpux10* | hpux11*)
7781+ # On HP-UX, both CC and GCC only warn that PIC is supported... then they
7782+ # create non-PIC objects. So, if there were any warnings, we assume that
7783+ # PIC is not supported.
7784+ if test -s conftest.err; then
7785+ echo "$ac_t"no 1>&6
7786+ can_build_shared=no
7787+ pic_flag=
7788+ else
7789+ echo "$ac_t"yes 1>&6
7790+ pic_flag=" $pic_flag"
7791+ fi
7792+ ;;
7793+ *)
7794+ echo "$ac_t"yes 1>&6
7795+ pic_flag=" $pic_flag"
7796+ ;;
7797+ esac
7798+ else
7799+ # Append any errors to the config.log.
7800+ cat conftest.err 1>&5
7801+ can_build_shared=no
7802+ pic_flag=
7803+ echo "$ac_t"no 1>&6
7804+ fi
7805+ CFLAGS="$save_CFLAGS"
7806+ $rm conftest*
7807+else
7808+ echo "$ac_t"none 1>&6
7809+fi
7810+
7811+# Check to see if options -o and -c are simultaneously supported by compiler
7812+echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
7813+$rm -r conftest 2>/dev/null
7814+mkdir conftest
7815+cd conftest
7816+$rm conftest*
7817+echo "int some_variable = 0;" > conftest.c
7818+mkdir out
7819+# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
7820+# that will create temporary files in the current directory regardless of
7821+# the output directory. Thus, making CWD read-only will cause this test
7822+# to fail, enabling locking or at least warning the user not to do parallel
7823+# builds.
7824+chmod -w .
7825+save_CFLAGS="$CFLAGS"
7826+CFLAGS="$CFLAGS -o out/conftest2.o"
7827+echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
7828+if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
7829+
7830+ # The compiler can only warn and ignore the option if not recognized
7831+ # So say no if there are warnings
7832+ if test -s out/conftest.err; then
7833+ echo "$ac_t"no 1>&6
7834+ compiler_c_o=no
7835+ else
7836+ echo "$ac_t"yes 1>&6
7837+ compiler_c_o=yes
7838+ fi
7839+else
7840+ # Append any errors to the config.log.
7841+ cat out/conftest.err 1>&5
7842+ compiler_c_o=no
7843+ echo "$ac_t"no 1>&6
7844+fi
7845+CFLAGS="$save_CFLAGS"
7846+chmod u+w .
7847+$rm conftest* out/*
7848+rmdir out
7849+cd ..
7850+rmdir conftest
7851+$rm -r conftest 2>/dev/null
7852+
7853+if test x"$compiler_c_o" = x"yes"; then
7854+ # Check to see if we can write to a .lo
7855+ echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
7856+ $rm conftest*
7857+ echo "int some_variable = 0;" > conftest.c
7858+ save_CFLAGS="$CFLAGS"
7859+ CFLAGS="$CFLAGS -c -o conftest.lo"
7860+ echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
7861+if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
7862+
7863+ # The compiler can only warn and ignore the option if not recognized
7864+ # So say no if there are warnings
7865+ if test -s conftest.err; then
7866+ echo "$ac_t"no 1>&6
7867+ compiler_o_lo=no
7868+ else
7869+ echo "$ac_t"yes 1>&6
7870+ compiler_o_lo=yes
7871+ fi
7872+ else
7873+ # Append any errors to the config.log.
7874+ cat conftest.err 1>&5
7875+ compiler_o_lo=no
7876+ echo "$ac_t"no 1>&6
7877+ fi
7878+ CFLAGS="$save_CFLAGS"
7879+ $rm conftest*
7880+else
7881+ compiler_o_lo=no
7882+fi
7883+
7884+# Check to see if we can do hard links to lock some files if needed
7885+hard_links="nottested"
7886+if test "$compiler_c_o" = no && test "$need_locks" != no; then
7887+ # do not overwrite the value of need_locks provided by the user
7888+ echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
7889+ hard_links=yes
7890+ $rm conftest*
7891+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
7892+ touch conftest.a
7893+ ln conftest.a conftest.b 2>&5 || hard_links=no
7894+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
7895+ echo "$ac_t$hard_links" 1>&6
7896+ $rm conftest*
7897+ if test "$hard_links" = no; then
7898+ echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
7899+ need_locks=warn
7900+ fi
7901+else
7902+ need_locks=no
7903+fi
7904+
7905+if test "$with_gcc" = yes; then
7906+ # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
7907+ echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
7908+ $rm conftest*
7909+ echo "int some_variable = 0;" > conftest.c
7910+ save_CFLAGS="$CFLAGS"
7911+ CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
7912+ echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7913+ if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
7914+
7915+ # The compiler can only warn and ignore the option if not recognized
7916+ # So say no if there are warnings
7917+ if test -s conftest.err; then
7918+ echo "$ac_t"no 1>&6
7919+ compiler_rtti_exceptions=no
7920+ else
7921+ echo "$ac_t"yes 1>&6
7922+ compiler_rtti_exceptions=yes
7923+ fi
7924+ else
7925+ # Append any errors to the config.log.
7926+ cat conftest.err 1>&5
7927+ compiler_rtti_exceptions=no
7928+ echo "$ac_t"no 1>&6
7929+ fi
7930+ CFLAGS="$save_CFLAGS"
7931+ $rm conftest*
7932+
7933+ if test "$compiler_rtti_exceptions" = "yes"; then
7934+ no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
7935+ else
7936+ no_builtin_flag=' -fno-builtin'
7937+ fi
7938+
7939+fi
7940+
7941+# Check for any special shared library compilation flags.
7942+if test -n "$special_shlib_compile_flags"; then
7943+ echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
7944+ if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
7945+ else
7946+ echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
7947+ can_build_shared=no
7948+ fi
7949+fi
7950+
7951+echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
7952+$rm conftest*
7953+echo 'main(){return(0);}' > conftest.c
7954+save_LDFLAGS="$LDFLAGS"
7955+LDFLAGS="$LDFLAGS $link_static_flag"
7956+echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
7957+if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7958+ echo "$ac_t$link_static_flag" 1>&6
7959+else
7960+ echo "$ac_t"none 1>&6
7961+ link_static_flag=
7962+fi
7963+LDFLAGS="$save_LDFLAGS"
7964+$rm conftest*
7965+
7966+if test -z "$LN_S"; then
7967+ # Check to see if we can use ln -s, or we need hard links.
7968+ echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
7969+ $rm conftest.dat
7970+ if ln -s X conftest.dat 2>/dev/null; then
7971+ $rm conftest.dat
7972+ LN_S="ln -s"
7973+ else
7974+ LN_S=ln
7975+ fi
7976+ if test "$LN_S" = "ln -s"; then
7977+ echo "$ac_t"yes 1>&6
7978+ else
7979+ echo "$ac_t"no 1>&6
7980+ fi
7981+fi
7982+
7983+# Make sure LD is an absolute path.
7984+if test -z "$LD"; then
7985+ ac_prog=ld
7986+ if test "$with_gcc" = yes; then
7987+ # Check if gcc -print-prog-name=ld gives a path.
7988+ echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
7989+ echo "$progname:991: checking for ld used by GCC" >&5
7990+ ac_prog=`($CC -print-prog-name=ld) 2>&5`
7991+ case "$ac_prog" in
7992+ # Accept absolute paths.
7993+ [\\/]* | [A-Za-z]:[\\/]*)
7994+ re_direlt='/[^/][^/]*/\.\./'
7995+ # Canonicalize the path of ld
7996+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
7997+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
7998+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
7999+ done
8000+ test -z "$LD" && LD="$ac_prog"
8001+ ;;
8002+ "")
8003+ # If it fails, then pretend we are not using GCC.
8004+ ac_prog=ld
8005+ ;;
8006+ *)
8007+ # If it is relative, then search for the first ld in PATH.
8008+ with_gnu_ld=unknown
8009+ ;;
8010+ esac
8011+ elif test "$with_gnu_ld" = yes; then
8012+ echo $ac_n "checking for GNU ld... $ac_c" 1>&6
8013+ echo "$progname:1015: checking for GNU ld" >&5
8014+ else
8015+ echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
8016+ echo "$progname:1018: checking for non-GNU ld" >&5
8017+ fi
8018+
8019+ if test -z "$LD"; then
8020+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8021+ for ac_dir in $PATH; do
8022+ test -z "$ac_dir" && ac_dir=.
8023+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8024+ LD="$ac_dir/$ac_prog"
8025+ # Check to see if the program is GNU ld. I'd rather use --version,
8026+ # but apparently some GNU ld's only accept -v.
8027+ # Break only if it was the GNU/non-GNU ld that we prefer.
8028+ if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8029+ test "$with_gnu_ld" != no && break
8030+ else
8031+ test "$with_gnu_ld" != yes && break
8032+ fi
8033+ fi
8034+ done
8035+ IFS="$ac_save_ifs"
8036+ fi
8037+
8038+ if test -n "$LD"; then
8039+ echo "$ac_t$LD" 1>&6
8040+ else
8041+ echo "$ac_t"no 1>&6
8042+ fi
8043+
8044+ if test -z "$LD"; then
8045+ echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
8046+ exit 1
8047+ fi
8048+fi
8049+
8050+# Check to see if it really is or is not GNU ld.
8051+echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
8052+# I'd rather use --version here, but apparently some GNU ld's only accept -v.
8053+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8054+ with_gnu_ld=yes
8055+else
8056+ with_gnu_ld=no
8057+fi
8058+echo "$ac_t$with_gnu_ld" 1>&6
8059+
8060+# See if the linker supports building shared libraries.
8061+echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
8062+
8063+allow_undefined_flag=
8064+no_undefined_flag=
8065+need_lib_prefix=unknown
8066+need_version=unknown
8067+# when you set need_version to no, make sure it does not cause -set_version
8068+# flags to be left without arguments
8069+archive_cmds=
8070+archive_expsym_cmds=
8071+old_archive_from_new_cmds=
8072+export_dynamic_flag_spec=
8073+whole_archive_flag_spec=
8074+thread_safe_flag_spec=
8075+hardcode_libdir_flag_spec=
8076+hardcode_libdir_separator=
8077+hardcode_direct=no
8078+hardcode_minus_L=no
8079+hardcode_shlibpath_var=unsupported
8080+runpath_var=
8081+always_export_symbols=no
8082+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
8083+# include_expsyms should be a list of space-separated symbols to be *always*
8084+# included in the symbol list
8085+include_expsyms=
8086+# exclude_expsyms can be an egrep regular expression of symbols to exclude
8087+# it will be wrapped by ` (' and `)$', so one must not match beginning or
8088+# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8089+# as well as any symbol that contains `d'.
8090+exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
8091+# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8092+# platforms (ab)use it in PIC code, but their linkers get confused if
8093+# the symbol is explicitly referenced. Since portable code cannot
8094+# rely on this symbol name, it's probably fine to never include it in
8095+# preloaded symbol tables.
8096+
8097+case "$host_os" in
8098+cygwin* | mingw*)
8099+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
8100+ # When not using gcc, we currently assume that we are using
8101+ # Microsoft Visual C++.
8102+ if test "$with_gcc" != yes; then
8103+ with_gnu_ld=no
8104+ fi
8105+ ;;
8106+
8107+esac
8108+
8109+ld_shlibs=yes
8110+if test "$with_gnu_ld" = yes; then
8111+ # If archive_cmds runs LD, not CC, wlarc should be empty
8112+ wlarc='${wl}'
8113+
8114+ # See if GNU ld supports shared libraries.
8115+ case "$host_os" in
8116+ aix3* | aix4*)
8117+ # On AIX, the GNU linker is very broken
8118+ ld_shlibs=no
8119+ cat <<EOF 1>&2
8120+
8121+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
8122+*** to be unable to reliably create shared libraries on AIX.
8123+*** Therefore, libtool is disabling shared libraries support. If you
8124+*** really care for shared libraries, you may want to modify your PATH
8125+*** so that a non-GNU linker is found, and then restart.
8126+
8127+EOF
8128+ ;;
8129+
8130+ amigaos*)
8131+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
8132+ hardcode_libdir_flag_spec='-L$libdir'
8133+ hardcode_minus_L=yes
8134+
8135+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8136+ # that the semantics of dynamic libraries on AmigaOS, at least up
8137+ # to version 4, is to share data among multiple programs linked
8138+ # with the same dynamic library. Since this doesn't match the
8139+ # behavior of shared libraries on other platforms, we can use
8140+ # them.
8141+ ld_shlibs=no
8142+ ;;
8143+
8144+ beos*)
8145+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
8146+ allow_undefined_flag=unsupported
8147+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8148+ # support --undefined. This deserves some investigation. FIXME
8149+ archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
8150+ else
8151+ ld_shlibs=no
8152+ fi
8153+ ;;
8154+
8155+ cygwin* | mingw*)
8156+ # hardcode_libdir_flag_spec is actually meaningless, as there is
8157+ # no search path for DLLs.
8158+ hardcode_libdir_flag_spec='-L$libdir'
8159+ allow_undefined_flag=unsupported
8160+ always_export_symbols=yes
8161+
8162+ # Extract the symbol export list from an `--export-all' def file,
8163+ # then regenerate the def file from the symbol export list, so that
8164+ # the compiled dll only exports the symbol export list.
8165+ export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
8166+ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
8167+ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
8168+ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
8169+
8170+ archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
8171+ _lt_hint=1;
8172+ for symbol in `cat $export_symbols`; do
8173+ echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
8174+ _lt_hint=`expr 1 + \$_lt_hint`;
8175+ done~
8176+ test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
8177+ test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
8178+ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
8179+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
8180+ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
8181+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
8182+ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
8183+
8184+ old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
8185+ ;;
8186+
8187+ netbsd*)
8188+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
8189+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
8190+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8191+ else
8192+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
8193+ # can we support soname and/or expsyms with a.out? -oliva
8194+ fi
8195+ ;;
8196+
8197+ solaris*)
8198+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
8199+ ld_shlibs=no
8200+ cat <<EOF 1>&2
8201+
8202+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
8203+*** create shared libraries on Solaris systems. Therefore, libtool
8204+*** is disabling shared libraries support. We urge you to upgrade GNU
8205+*** binutils to release 2.9.1 or newer. Another option is to modify
8206+*** your PATH or compiler configuration so that the native linker is
8207+*** used, and then restart.
8208+
8209+EOF
8210+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
8211+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
8212+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8213+ else
8214+ ld_shlibs=no
8215+ fi
8216+ ;;
8217+
8218+ sunos4*)
8219+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
8220+ wlarc=
8221+ hardcode_direct=yes
8222+ hardcode_shlibpath_var=no
8223+ ;;
8224+
8225+ *)
8226+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
8227+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
8228+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8229+ else
8230+ ld_shlibs=no
8231+ fi
8232+ ;;
8233+ esac
8234+
8235+ if test "$ld_shlibs" = yes; then
8236+ runpath_var=LD_RUN_PATH
8237+ hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8238+ export_dynamic_flag_spec='${wl}--export-dynamic'
8239+ case $host_os in
8240+ cygwin* | mingw*)
8241+ # dlltool doesn't understand --whole-archive et. al.
8242+ whole_archive_flag_spec=
8243+ ;;
8244+ *)
8245+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8246+ ;;
8247+ esac
8248+ fi
8249+else
8250+ # PORTME fill in a description of your system's linker (not GNU ld)
8251+ case "$host_os" in
8252+ aix3*)
8253+ allow_undefined_flag=unsupported
8254+ always_export_symbols=yes
8255+ archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
8256+ # Note: this linker hardcodes the directories in LIBPATH if there
8257+ # are no directories specified by -L.
8258+ hardcode_minus_L=yes
8259+ if test "$with_gcc" = yes && test -z "$link_static_flag"; then
8260+ # Neither direct hardcoding nor static linking is supported with a
8261+ # broken collect2.
8262+ hardcode_direct=unsupported
8263+ fi
8264+ ;;
8265+
8266+ aix4*)
8267+ hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
8268+ hardcode_libdir_separator=':'
8269+ if test "$with_gcc" = yes; then
8270+ collect2name=`${CC} -print-prog-name=collect2`
8271+ if test -f "$collect2name" && \
8272+ strings "$collect2name" | grep resolve_lib_name >/dev/null
8273+ then
8274+ # We have reworked collect2
8275+ hardcode_direct=yes
8276+ else
8277+ # We have old collect2
8278+ hardcode_direct=unsupported
8279+ # It fails to find uninstalled libraries when the uninstalled
8280+ # path is not listed in the libpath. Setting hardcode_minus_L
8281+ # to unsupported forces relinking
8282+ hardcode_minus_L=yes
8283+ hardcode_libdir_flag_spec='-L$libdir'
8284+ hardcode_libdir_separator=
8285+ fi
8286+ shared_flag='-shared'
8287+ else
8288+ shared_flag='${wl}-bM:SRE'
8289+ hardcode_direct=yes
8290+ fi
8291+ allow_undefined_flag=' ${wl}-berok'
8292+ archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
8293+ archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
8294+ case "$host_os" in aix4.[01]|aix4.[01].*)
8295+ # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
8296+ always_export_symbols=yes ;;
8297+ esac
8298+ ;;
8299+
8300+ amigaos*)
8301+ archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
8302+ hardcode_libdir_flag_spec='-L$libdir'
8303+ hardcode_minus_L=yes
8304+ # see comment about different semantics on the GNU ld section
8305+ ld_shlibs=no
8306+ ;;
8307+
8308+ cygwin* | mingw*)
8309+ # When not using gcc, we currently assume that we are using
8310+ # Microsoft Visual C++.
8311+ # hardcode_libdir_flag_spec is actually meaningless, as there is
8312+ # no search path for DLLs.
8313+ hardcode_libdir_flag_spec=' '
8314+ allow_undefined_flag=unsupported
8315+ # Tell ltmain to make .lib files, not .a files.
8316+ libext=lib
8317+ # FIXME: Setting linknames here is a bad hack.
8318+ archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
8319+ # The linker will automatically build a .lib file if we build a DLL.
8320+ old_archive_from_new_cmds='true'
8321+ # FIXME: Should let the user specify the lib program.
8322+ old_archive_cmds='lib /OUT:$oldlib$oldobjs'
8323+ fix_srcfile_path='`cygpath -w $srcfile`'
8324+ ;;
8325+
8326+ freebsd1*)
8327+ ld_shlibs=no
8328+ ;;
8329+
8330+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8331+ # support. Future versions do this automatically, but an explicit c++rt0.o
8332+ # does not break anything, and helps significantly (at the cost of a little
8333+ # extra space).
8334+ freebsd2.2*)
8335+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
8336+ hardcode_libdir_flag_spec='-R$libdir'
8337+ hardcode_direct=yes
8338+ hardcode_shlibpath_var=no
8339+ ;;
8340+
8341+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8342+ freebsd2*)
8343+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
8344+ hardcode_direct=yes
8345+ hardcode_minus_L=yes
8346+ hardcode_shlibpath_var=no
8347+ ;;
8348+
8349+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8350+ freebsd*)
8351+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
8352+ hardcode_libdir_flag_spec='-R$libdir'
8353+ hardcode_direct=yes
8354+ hardcode_shlibpath_var=no
8355+ ;;
8356+
8357+ hpux9* | hpux10* | hpux11*)
8358+ case "$host_os" in
8359+ hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
8360+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
8361+ esac
8362+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8363+ hardcode_libdir_separator=:
8364+ hardcode_direct=yes
8365+ hardcode_minus_L=yes # Not in the search PATH, but as the default
8366+ # location of the library.
8367+ export_dynamic_flag_spec='${wl}-E'
8368+ ;;
8369+
8370+ irix5* | irix6*)
8371+ if test "$with_gcc" = yes; then
8372+ archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8373+ else
8374+ archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8375+ fi
8376+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8377+ hardcode_libdir_separator=:
8378+ ;;
8379+
8380+ netbsd*)
8381+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8382+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
8383+ else
8384+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
8385+ fi
8386+ hardcode_libdir_flag_spec='${wl}-R$libdir'
8387+ hardcode_direct=yes
8388+ hardcode_shlibpath_var=no
8389+ ;;
8390+
8391+ openbsd*)
8392+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
8393+ hardcode_libdir_flag_spec='-R$libdir'
8394+ hardcode_direct=yes
8395+ hardcode_shlibpath_var=no
8396+ ;;
8397+
8398+ os2*)
8399+ hardcode_libdir_flag_spec='-L$libdir'
8400+ hardcode_minus_L=yes
8401+ allow_undefined_flag=unsupported
8402+ archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
8403+ old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
8404+ ;;
8405+
8406+ osf3* | osf4*)
8407+ if test "$with_gcc" = yes; then
8408+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8409+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
8410+ else
8411+ allow_undefined_flag=' -expect_unresolved \*'
8412+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
8413+ fi
8414+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8415+ hardcode_libdir_separator=:
8416+ ;;
8417+
8418+ sco3.2v5*)
8419+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
8420+ hardcode_shlibpath_var=no
8421+ runpath_var=LD_RUN_PATH
8422+ hardcode_runpath_var=yes
8423+ ;;
8424+
8425+ solaris*)
8426+ no_undefined_flag=' -z text'
8427+ # $CC -shared without GNU ld will not create a library from C++
8428+ # object files and a static libstdc++, better avoid it by now
8429+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
8430+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8431+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
8432+ hardcode_libdir_flag_spec='-R$libdir'
8433+ hardcode_shlibpath_var=no
8434+ case "$host_os" in
8435+ solaris2.[0-5] | solaris2.[0-5].*) ;;
8436+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
8437+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
8438+ esac
8439+ ;;
8440+
8441+ sunos4*)
8442+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
8443+ hardcode_libdir_flag_spec='-L$libdir'
8444+ hardcode_direct=yes
8445+ hardcode_minus_L=yes
8446+ hardcode_shlibpath_var=no
8447+ ;;
8448+
8449+ sysv4)
8450+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
8451+ runpath_var='LD_RUN_PATH'
8452+ hardcode_shlibpath_var=no
8453+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8454+ ;;
8455+
8456+ sysv4.3*)
8457+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
8458+ hardcode_shlibpath_var=no
8459+ export_dynamic_flag_spec='-Bexport'
8460+ ;;
8461+
8462+ uts4*)
8463+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
8464+ hardcode_libdir_flag_spec='-L$libdir'
8465+ hardcode_shlibpath_var=no
8466+ ;;
8467+
8468+ dgux*)
8469+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
8470+ hardcode_libdir_flag_spec='-L$libdir'
8471+ hardcode_shlibpath_var=no
8472+ ;;
8473+
8474+ sysv4*MP*)
8475+ if test -d /usr/nec ;then
8476+ # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
8477+ archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
8478+ hardcode_shlibpath_var=no
8479+ runpath_var=LD_RUN_PATH
8480+ hardcode_runpath_var=yes
8481+ ld_shlibs=yes
8482+ fi
8483+ ;;
8484+
8485+ *)
8486+ ld_shlibs=no
8487+ ;;
8488+ esac
8489+fi
8490+echo "$ac_t$ld_shlibs" 1>&6
8491+test "$ld_shlibs" = no && can_build_shared=no
8492+
8493+if test -z "$NM"; then
8494+ echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
8495+ case "$NM" in
8496+ [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
8497+ *)
8498+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8499+ for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
8500+ test -z "$ac_dir" && ac_dir=.
8501+ if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
8502+ # Check to see if the nm accepts a BSD-compat flag.
8503+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
8504+ # nm: unknown option "B" ignored
8505+ if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
8506+ NM="$ac_dir/nm -B"
8507+ break
8508+ elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
8509+ NM="$ac_dir/nm -p"
8510+ break
8511+ else
8512+ NM=${NM="$ac_dir/nm"} # keep the first match, but
8513+ continue # so that we can try to find one that supports BSD flags
8514+ fi
8515+ fi
8516+ done
8517+ IFS="$ac_save_ifs"
8518+ test -z "$NM" && NM=nm
8519+ ;;
8520+ esac
8521+ echo "$ac_t$NM" 1>&6
8522+fi
8523+
8524+# Check for command to grab the raw symbol name followed by C symbol from nm.
8525+echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
8526+
8527+# These are sane defaults that work on at least a few old systems.
8528+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
8529+
8530+# Character class describing NM global symbol codes.
8531+symcode='[BCDEGRST]'
8532+
8533+# Regexp to match symbols that can be accessed directly from C.
8534+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8535+
8536+# Transform the above into a raw symbol and a C symbol.
8537+symxfrm='\1 \2\3 \3'
8538+
8539+# Transform an extracted symbol line into a proper C declaration
8540+global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
8541+
8542+# Define system-specific variables.
8543+case "$host_os" in
8544+aix*)
8545+ symcode='[BCDT]'
8546+ ;;
8547+cygwin* | mingw*)
8548+ symcode='[ABCDGISTW]'
8549+ ;;
8550+hpux*) # Its linker distinguishes data from code symbols
8551+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
8552+ ;;
8553+irix*)
8554+ symcode='[BCDEGRST]'
8555+ ;;
8556+solaris*)
8557+ symcode='[BDT]'
8558+ ;;
8559+sysv4)
8560+ symcode='[DFNSTU]'
8561+ ;;
8562+esac
8563+
8564+# If we're using GNU nm, then use its standard symbol codes.
8565+if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
8566+ symcode='[ABCDGISTW]'
8567+fi
8568+
8569+# Try without a prefix undercore, then with it.
8570+for ac_symprfx in "" "_"; do
8571+
8572+ # Write the raw and C identifiers.
8573+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
8574+
8575+ # Check to see that the pipe works correctly.
8576+ pipe_works=no
8577+ $rm conftest*
8578+ cat > conftest.c <<EOF
8579+#ifdef __cplusplus
8580+extern "C" {
8581+#endif
8582+char nm_test_var;
8583+void nm_test_func(){}
8584+#ifdef __cplusplus
8585+}
8586+#endif
8587+main(){nm_test_var='a';nm_test_func();return(0);}
8588+EOF
8589+
8590+ echo "$progname:1592: checking if global_symbol_pipe works" >&5
8591+ if { (eval echo $progname:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
8592+ # Now try to grab the symbols.
8593+ nlist=conftest.nm
8594+ if { echo "$progname:1596: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
8595+
8596+ # Try sorting and uniquifying the output.
8597+ if sort "$nlist" | uniq > "$nlist"T; then
8598+ mv -f "$nlist"T "$nlist"
8599+ else
8600+ rm -f "$nlist"T
8601+ fi
8602+
8603+ # Make sure that we snagged all the symbols we need.
8604+ if egrep ' nm_test_var$' "$nlist" >/dev/null; then
8605+ if egrep ' nm_test_func$' "$nlist" >/dev/null; then
8606+ cat <<EOF > conftest.c
8607+#ifdef __cplusplus
8608+extern "C" {
8609+#endif
8610+
8611+EOF
8612+ # Now generate the symbol file.
8613+ eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
8614+
8615+ cat <<EOF >> conftest.c
8616+#if defined (__STDC__) && __STDC__
8617+# define lt_ptr_t void *
8618+#else
8619+# define lt_ptr_t char *
8620+# define const
8621+#endif
8622+
8623+/* The mapping between symbol names and symbols. */
8624+const struct {
8625+ const char *name;
8626+ lt_ptr_t address;
8627+}
8628+lt_preloaded_symbols[] =
8629+{
8630+EOF
8631+ sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
8632+ cat <<\EOF >> conftest.c
8633+ {0, (lt_ptr_t) 0}
8634+};
8635+
8636+#ifdef __cplusplus
8637+}
8638+#endif
8639+EOF
8640+ # Now try linking the two files.
8641+ mv conftest.$objext conftstm.$objext
8642+ save_LIBS="$LIBS"
8643+ save_CFLAGS="$CFLAGS"
8644+ LIBS="conftstm.$objext"
8645+ CFLAGS="$CFLAGS$no_builtin_flag"
8646+ if { (eval echo $progname:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8647+ pipe_works=yes
8648+ else
8649+ echo "$progname: failed program was:" >&5
8650+ cat conftest.c >&5
8651+ fi
8652+ LIBS="$save_LIBS"
8653+ else
8654+ echo "cannot find nm_test_func in $nlist" >&5
8655+ fi
8656+ else
8657+ echo "cannot find nm_test_var in $nlist" >&5
8658+ fi
8659+ else
8660+ echo "cannot run $global_symbol_pipe" >&5
8661+ fi
8662+ else
8663+ echo "$progname: failed program was:" >&5
8664+ cat conftest.c >&5
8665+ fi
8666+ $rm conftest* conftst*
8667+
8668+ # Do not use the global_symbol_pipe unless it works.
8669+ if test "$pipe_works" = yes; then
8670+ break
8671+ else
8672+ global_symbol_pipe=
8673+ fi
8674+done
8675+if test "$pipe_works" = yes; then
8676+ echo "${ac_t}ok" 1>&6
8677+else
8678+ echo "${ac_t}failed" 1>&6
8679+fi
8680+
8681+if test -z "$global_symbol_pipe"; then
8682+ global_symbol_to_cdecl=
8683+fi
8684+
8685+# Check hardcoding attributes.
8686+echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
8687+hardcode_action=
8688+if test -n "$hardcode_libdir_flag_spec" || \
8689+ test -n "$runpath_var"; then
8690+
8691+ # We can hardcode non-existant directories.
8692+ if test "$hardcode_direct" != no &&
8693+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
8694+ # have to relink, otherwise we might link with an installed library
8695+ # when we should be linking with a yet-to-be-installed one
8696+ ## test "$hardcode_shlibpath_var" != no &&
8697+ test "$hardcode_minus_L" != no; then
8698+ # Linking always hardcodes the temporary library directory.
8699+ hardcode_action=relink
8700+ else
8701+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
8702+ hardcode_action=immediate
8703+ fi
8704+else
8705+ # We cannot hardcode anything, or else we can only hardcode existing
8706+ # directories.
8707+ hardcode_action=unsupported
8708+fi
8709+echo "$ac_t$hardcode_action" 1>&6
8710+
8711+
8712+reload_flag=
8713+reload_cmds='$LD$reload_flag -o $output$reload_objs'
8714+echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
8715+# PORTME Some linkers may need a different reload flag.
8716+reload_flag='-r'
8717+echo "$ac_t$reload_flag" 1>&6
8718+test -n "$reload_flag" && reload_flag=" $reload_flag"
8719+
8720+# PORTME Fill in your ld.so characteristics
8721+library_names_spec=
8722+libname_spec='lib$name'
8723+soname_spec=
8724+postinstall_cmds=
8725+postuninstall_cmds=
8726+finish_cmds=
8727+finish_eval=
8728+shlibpath_var=
8729+shlibpath_overrides_runpath=unknown
8730+version_type=none
8731+dynamic_linker="$host_os ld.so"
8732+sys_lib_dlsearch_path_spec="/lib /usr/lib"
8733+sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8734+file_magic_cmd=
8735+file_magic_test_file=
8736+deplibs_check_method='unknown'
8737+# Need to set the preceding variable on all platforms that support
8738+# interlibrary dependencies.
8739+# 'none' -- dependencies not supported.
8740+# `unknown' -- same as none, but documents that we really don't know.
8741+# 'pass_all' -- all dependencies passed with no checks.
8742+# 'test_compile' -- check by making test program.
8743+# 'file_magic [regex]' -- check by looking for files in library path
8744+# which responds to the $file_magic_cmd with a given egrep regex.
8745+# If you have `file' or equivalent on your system and you're not sure
8746+# whether `pass_all' will *always* work, you probably want this one.
8747+echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
8748+case "$host_os" in
8749+aix3*)
8750+ version_type=linux
8751+ library_names_spec='${libname}${release}.so$versuffix $libname.a'
8752+ shlibpath_var=LIBPATH
8753+
8754+ # AIX has no versioning support, so we append a major version to the name.
8755+ soname_spec='${libname}${release}.so$major'
8756+ ;;
8757+
8758+aix4*)
8759+ version_type=linux
8760+ # AIX has no versioning support, so currently we can not hardcode correct
8761+ # soname into executable. Probably we can add versioning support to
8762+ # collect2, so additional links can be useful in future.
8763+ # We preserve .a as extension for shared libraries though AIX4.2
8764+ # and later linker supports .so
8765+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
8766+ shlibpath_var=LIBPATH
8767+ deplibs_check_method=pass_all
8768+ ;;
8769+
8770+amigaos*)
8771+ library_names_spec='$libname.ixlibrary $libname.a'
8772+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
8773+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
8774+ ;;
8775+
8776+beos*)
8777+ library_names_spec='${libname}.so'
8778+ dynamic_linker="$host_os ld.so"
8779+ shlibpath_var=LIBRARY_PATH
8780+ deplibs_check_method=pass_all
8781+ lt_cv_dlopen="load_add_on"
8782+ lt_cv_dlopen_libs=
8783+ lt_cv_dlopen_self=yes
8784+ ;;
8785+
8786+bsdi4*)
8787+ version_type=linux
8788+ library_names_spec='${libname}.so$major ${libname}.so'
8789+ soname_spec='${libname}.so'
8790+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
8791+ shlibpath_var=LD_LIBRARY_PATH
8792+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8793+ file_magic_cmd=/usr/bin/file
8794+ file_magic_test_file=/shlib/libc.so
8795+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
8796+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
8797+ # the default ld.so.conf also contains /usr/contrib/lib and
8798+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
8799+ # libtool to hard-code these into programs
8800+ ;;
8801+
8802+cygwin* | mingw*)
8803+ version_type=windows
8804+ need_version=no
8805+ need_lib_prefix=no
8806+ if test "$with_gcc" = yes; then
8807+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
8808+ else
8809+ library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
8810+ fi
8811+ dynamic_linker='Win32 ld.exe'
8812+ deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
8813+ file_magic_cmd='${OBJDUMP} -f'
8814+ # FIXME: first we should search . and the directory the executable is in
8815+ shlibpath_var=PATH
8816+ lt_cv_dlopen="LoadLibrary"
8817+ lt_cv_dlopen_libs=
8818+ ;;
8819+
8820+freebsd1*)
8821+ dynamic_linker=no
8822+ ;;
8823+
8824+freebsd*)
8825+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
8826+ version_type=freebsd-$objformat
8827+ case "$version_type" in
8828+ freebsd-elf*)
8829+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
8830+ file_magic_cmd=/usr/bin/file
8831+ file_magic_test_file=`echo /usr/lib/libc.so*`
8832+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
8833+ need_version=no
8834+ need_lib_prefix=no
8835+ ;;
8836+ freebsd-*)
8837+ deplibs_check_method=unknown
8838+ library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
8839+ need_version=yes
8840+ ;;
8841+ esac
8842+ finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir'
8843+ shlibpath_var=LD_LIBRARY_PATH
8844+ case "$host_os" in
8845+ freebsd2* | freebsd3.[01]*)
8846+ shlibpath_overrides_runpath=yes
8847+ ;;
8848+ *) # from 3.2 on
8849+ shlibpath_overrides_runpath=no
8850+ ;;
8851+ esac
8852+ ;;
8853+
8854+gnu*)
8855+ version_type=linux
8856+ need_lib_prefix=no
8857+ need_version=no
8858+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
8859+ soname_spec='${libname}${release}.so$major'
8860+ shlibpath_var=LD_LIBRARY_PATH
8861+ ;;
8862+
8863+hpux9* | hpux10* | hpux11*)
8864+ # Give a soname corresponding to the major version so that dld.sl refuses to
8865+ # link against other versions.
8866+ dynamic_linker="$host_os dld.sl"
8867+ version_type=sunos
8868+ need_lib_prefix=no
8869+ need_version=no
8870+ shlibpath_var=SHLIB_PATH
8871+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
8872+ library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
8873+ soname_spec='${libname}${release}.sl$major'
8874+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
8875+ postinstall_cmds='chmod 555 $lib'
8876+ ;;
8877+
8878+irix5* | irix6*)
8879+ version_type=irix
8880+ need_lib_prefix=no
8881+ need_version=no
8882+ soname_spec='${libname}${release}.so.$major'
8883+ library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
8884+ case "$host_os" in
8885+ irix5*)
8886+ libsuff= shlibsuff=
8887+ # this will be overridden with pass_all, but let us keep it just in case
8888+ deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
8889+ ;;
8890+ *)
8891+ case "$LD" in # libtool.m4 will add one of these switches to LD
8892+ *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
8893+ *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
8894+ *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
8895+ *) libsuff= shlibsuff= libmagic=never-match;;
8896+ esac
8897+ # this will be overridden with pass_all, but let us keep it just in case
8898+ deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
8899+ ;;
8900+ esac
8901+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
8902+ shlibpath_overrides_runpath=no
8903+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
8904+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
8905+ file_magic_cmd=/usr/bin/file
8906+ file_magic_test_file=`echo /lib${libsuff}/libc.so*`
8907+ deplibs_check_method='pass_all'
8908+ ;;
8909+
8910+# No shared lib support for Linux oldld, aout, or coff.
8911+linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
8912+ dynamic_linker=no
8913+ ;;
8914+
8915+# This must be Linux ELF.
8916+linux-gnu*)
8917+ version_type=linux
8918+ need_lib_prefix=no
8919+ need_version=no
8920+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
8921+ soname_spec='${libname}${release}.so$major'
8922+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
8923+ shlibpath_var=LD_LIBRARY_PATH
8924+ shlibpath_overrides_runpath=no
8925+ deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8926+ file_magic_cmd=/usr/bin/file
8927+ file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
8928+
8929+ if test -f /lib/ld.so.1; then
8930+ dynamic_linker='GNU ld.so'
8931+ else
8932+ # Only the GNU ld.so supports shared libraries on MkLinux.
8933+ case "$host_cpu" in
8934+ *) dynamic_linker='Linux ld.so' ;;
8935+ esac
8936+ fi
8937+ ;;
8938+
8939+netbsd*)
8940+ version_type=sunos
8941+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8942+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
8943+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
8944+ dynamic_linker='NetBSD (a.out) ld.so'
8945+ else
8946+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
8947+ soname_spec='${libname}${release}.so$major'
8948+ dynamic_linker='NetBSD ld.elf_so'
8949+ fi
8950+ shlibpath_var=LD_LIBRARY_PATH
8951+ ;;
8952+
8953+openbsd*)
8954+ version_type=sunos
8955+ if test "$with_gnu_ld" = yes; then
8956+ need_lib_prefix=no
8957+ need_version=no
8958+ fi
8959+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
8960+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
8961+ shlibpath_var=LD_LIBRARY_PATH
8962+ ;;
8963+
8964+os2*)
8965+ libname_spec='$name'
8966+ need_lib_prefix=no
8967+ library_names_spec='$libname.dll $libname.a'
8968+ dynamic_linker='OS/2 ld.exe'
8969+ shlibpath_var=LIBPATH
8970+ ;;
8971+
8972+osf3* | osf4*)
8973+ version_type=osf
8974+ need_version=no
8975+ soname_spec='${libname}${release}.so'
8976+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
8977+ shlibpath_var=LD_LIBRARY_PATH
8978+ # this will be overridden with pass_all, but let us keep it just in case
8979+ deplibs_check_method='file_magic COFF format alpha shared library'
8980+ file_magic_cmd=/usr/bin/file
8981+ file_magic_test_file=/shlib/libc.so
8982+ deplibs_check_method='pass_all'
8983+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
8984+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
8985+ ;;
8986+
8987+sco3.2v5*)
8988+ version_type=osf
8989+ soname_spec='${libname}${release}.so$major'
8990+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
8991+ shlibpath_var=LD_LIBRARY_PATH
8992+ ;;
8993+
8994+solaris*)
8995+ version_type=linux
8996+ need_lib_prefix=no
8997+ need_version=no
8998+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
8999+ soname_spec='${libname}${release}.so$major'
9000+ shlibpath_var=LD_LIBRARY_PATH
9001+ shlibpath_overrides_runpath=yes
9002+ # ldd complains unless libraries are executable
9003+ postinstall_cmds='chmod +x $lib'
9004+ deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
9005+ file_magic_cmd=/usr/bin/file
9006+ file_magic_test_file=/lib/libc.so
9007+ ;;
9008+
9009+sunos4*)
9010+ version_type=sunos
9011+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
9012+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9013+ shlibpath_var=LD_LIBRARY_PATH
9014+ shlibpath_overrides_runpath=yes
9015+ if test "$with_gnu_ld" = yes; then
9016+ need_lib_prefix=no
9017+ fi
9018+ need_version=yes
9019+ ;;
9020+
9021+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
9022+ version_type=linux
9023+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
9024+ soname_spec='${libname}${release}.so$major'
9025+ shlibpath_var=LD_LIBRARY_PATH
9026+ case "$host_vendor" in
9027+ ncr)
9028+ deplibs_check_method='pass_all'
9029+ ;;
9030+ motorola)
9031+ need_lib_prefix=no
9032+ need_version=no
9033+ shlibpath_overrides_runpath=no
9034+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9035+ 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]'
9036+ file_magic_cmd=/usr/bin/file
9037+ file_magic_test_file=`echo /usr/lib/libc.so*`
9038+ ;;
9039+ esac
9040+ ;;
9041+
9042+uts4*)
9043+ version_type=linux
9044+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
9045+ soname_spec='${libname}${release}.so$major'
9046+ shlibpath_var=LD_LIBRARY_PATH
9047+ ;;
9048+
9049+dgux*)
9050+ version_type=linux
9051+ need_lib_prefix=no
9052+ need_version=no
9053+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
9054+ soname_spec='${libname}${release}.so$major'
9055+ shlibpath_var=LD_LIBRARY_PATH
9056+ ;;
9057+
9058+sysv4*MP*)
9059+ if test -d /usr/nec ;then
9060+ version_type=linux
9061+ library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
9062+ soname_spec='$libname.so.$major'
9063+ shlibpath_var=LD_LIBRARY_PATH
9064+ fi
9065+ ;;
9066+
9067+*)
9068+ dynamic_linker=no
9069+ ;;
9070+esac
9071+echo "$ac_t$dynamic_linker" 1>&6
9072+test "$dynamic_linker" = no && can_build_shared=no
9073+
9074+# Report the final consequences.
9075+echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
9076+
9077+# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
9078+# configure.in, otherwise build static only libraries.
9079+case "$host_os" in
9080+cygwin* | mingw* | os2*)
9081+ if test x$can_build_shared = xyes; then
9082+ test x$enable_win32_dll = xno && can_build_shared=no
9083+ echo "checking if package supports dlls... $can_build_shared" 1>&6
9084+ fi
9085+;;
9086+esac
9087+
9088+if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
9089+ case "$deplibs_check_method" in
9090+ "file_magic "*)
9091+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
9092+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9093+ egrep "$file_magic_regex" > /dev/null; then
9094+ :
9095+ else
9096+ cat <<EOF 1>&2
9097+
9098+*** Warning: the command libtool uses to detect shared libraries,
9099+*** $file_magic_cmd, produces output that libtool cannot recognize.
9100+*** The result is that libtool may fail to recognize shared libraries
9101+*** as such. This will affect the creation of libtool libraries that
9102+*** depend on shared libraries, but programs linked with such libtool
9103+*** libraries will work regardless of this problem. Nevertheless, you
9104+*** may want to report the problem to your system manager and/or to
9105+*** bug-libtool@gnu.org
9106+
9107+EOF
9108+ fi ;;
9109+ esac
9110+fi
9111+
9112+echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
9113+test "$can_build_shared" = "no" && enable_shared=no
9114+
9115+# On AIX, shared libraries and static libraries use the same namespace, and
9116+# are all built from PIC.
9117+case "$host_os" in
9118+aix3*)
9119+ test "$enable_shared" = yes && enable_static=no
9120+ if test -n "$RANLIB"; then
9121+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
9122+ postinstall_cmds='$RANLIB $lib'
9123+ fi
9124+ ;;
9125+
9126+aix4*)
9127+ test "$enable_shared" = yes && enable_static=no
9128+ ;;
9129+esac
9130+
9131+echo "$ac_t$enable_shared" 1>&6
9132+
9133+# Make sure either enable_shared or enable_static is yes.
9134+test "$enable_shared" = yes || enable_static=yes
9135+
9136+echo "checking whether to build static libraries... $enable_static" 1>&6
9137+
9138+if test "$hardcode_action" = relink; then
9139+ # Fast installation is not supported
9140+ enable_fast_install=no
9141+elif test "$shlibpath_overrides_runpath" = yes ||
9142+ test "$enable_shared" = no; then
9143+ # Fast installation is not necessary
9144+ enable_fast_install=needless
9145+fi
9146+
9147+echo $ac_n "checking for objdir... $ac_c" 1>&6
9148+rm -f .libs 2>/dev/null
9149+mkdir .libs 2>/dev/null
9150+if test -d .libs; then
9151+ objdir=.libs
9152+else
9153+ # MS-DOS does not allow filenames that begin with a dot.
9154+ objdir=_libs
9155+fi
9156+rmdir .libs 2>/dev/null
9157+echo "$ac_t$objdir" 1>&6
9158+
9159+if test "x$enable_dlopen" != xyes; then
9160+ enable_dlopen=unknown
9161+ enable_dlopen_self=unknown
9162+ enable_dlopen_self_static=unknown
9163+else
9164+if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
9165+ lt_cv_dlopen=no lt_cv_dlopen_libs=
9166+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9167+echo "$progname:2170: checking for dlopen in -ldl" >&5
9168+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9169+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9170+ echo $ac_n "(cached) $ac_c" 1>&6
9171+else
9172+ ac_save_LIBS="$LIBS"
9173+LIBS="-ldl $LIBS"
9174+cat > conftest.$ac_ext <<EOF
9175+#line 2178 "ltconfig"
9176+/* Override any gcc2 internal prototype to avoid an error. */
9177+/* We use char because int might match the return type of a gcc2
9178+ builtin and then its argument prototype would still apply. */
9179+char dlopen();
9180+
9181+int main() {
9182+dlopen()
9183+; return 0; }
9184+EOF
9185+if { (eval echo $progname:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9186+ rm -rf conftest*
9187+ eval "ac_cv_lib_$ac_lib_var=yes"
9188+else
9189+ echo "$progname: failed program was:" >&5
9190+ cat conftest.$ac_ext >&5
9191+ rm -rf conftest*
9192+ eval "ac_cv_lib_$ac_lib_var=no"
9193+fi
9194+rm -f conftest*
9195+LIBS="$ac_save_LIBS"
9196+
9197+fi
9198+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9199+ echo "$ac_t""yes" 1>&6
9200+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9201+else
9202+ echo "$ac_t""no" 1>&6
9203+echo $ac_n "checking for dlopen""... $ac_c" 1>&6
9204+echo "$progname:2207: checking for dlopen" >&5
9205+if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
9206+ echo $ac_n "(cached) $ac_c" 1>&6
9207+else
9208+ cat > conftest.$ac_ext <<EOF
9209+#line 2212 "ltconfig"
9210+/* System header to define __stub macros and hopefully few prototypes,
9211+ which can conflict with char dlopen(); below. */
9212+#include <assert.h>
9213+/* Override any gcc2 internal prototype to avoid an error. */
9214+/* We use char because int might match the return type of a gcc2
9215+ builtin and then its argument prototype would still apply. */
9216+char dlopen();
9217+
9218+int main() {
9219+
9220+/* The GNU C library defines this for functions which it implements
9221+ to always fail with ENOSYS. Some functions are actually named
9222+ something starting with __ and the normal name is an alias. */
9223+#if defined (__stub_dlopen) || defined (__stub___dlopen)
9224+choke me
9225+#else
9226+dlopen();
9227+#endif
9228+
9229+; return 0; }
9230+EOF
9231+if { (eval echo $progname:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9232+ rm -rf conftest*
9233+ eval "ac_cv_func_dlopen=yes"
9234+else
9235+ echo "$progname: failed program was:" >&5
9236+ cat conftest.$ac_ext >&5
9237+ rm -rf conftest*
9238+ eval "ac_cv_func_dlopen=no"
9239+fi
9240+rm -f conftest*
9241+fi
9242+if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9243+ echo "$ac_t""yes" 1>&6
9244+ lt_cv_dlopen="dlopen"
9245+else
9246+ echo "$ac_t""no" 1>&6
9247+echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
9248+echo "$progname:2251: checking for dld_link in -ldld" >&5
9249+ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
9250+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9251+ echo $ac_n "(cached) $ac_c" 1>&6
9252+else
9253+ ac_save_LIBS="$LIBS"
9254+LIBS="-ldld $LIBS"
9255+cat > conftest.$ac_ext <<EOF
9256+#line 2259 "ltconfig"
9257+/* Override any gcc2 internal prototype to avoid an error. */
9258+/* We use char because int might match the return type of a gcc2
9259+ builtin and then its argument prototype would still apply. */
9260+char dld_link();
9261+
9262+int main() {
9263+dld_link()
9264+; return 0; }
9265+EOF
9266+if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9267+ rm -rf conftest*
9268+ eval "ac_cv_lib_$ac_lib_var=yes"
9269+else
9270+ echo "$progname: failed program was:" >&5
9271+ cat conftest.$ac_ext >&5
9272+ rm -rf conftest*
9273+ eval "ac_cv_lib_$ac_lib_var=no"
9274+fi
9275+rm -f conftest*
9276+LIBS="$ac_save_LIBS"
9277+
9278+fi
9279+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9280+ echo "$ac_t""yes" 1>&6
9281+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
9282+else
9283+ echo "$ac_t""no" 1>&6
9284+echo $ac_n "checking for shl_load""... $ac_c" 1>&6
9285+echo "$progname:2288: checking for shl_load" >&5
9286+if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
9287+ echo $ac_n "(cached) $ac_c" 1>&6
9288+else
9289+ cat > conftest.$ac_ext <<EOF
9290+#line 2293 "ltconfig"
9291+/* System header to define __stub macros and hopefully few prototypes,
9292+ which can conflict with char shl_load(); below. */
9293+#include <assert.h>
9294+/* Override any gcc2 internal prototype to avoid an error. */
9295+/* We use char because int might match the return type of a gcc2
9296+ builtin and then its argument prototype would still apply. */
9297+char shl_load();
9298+
9299+int main() {
9300+
9301+/* The GNU C library defines this for functions which it implements
9302+ to always fail with ENOSYS. Some functions are actually named
9303+ something starting with __ and the normal name is an alias. */
9304+#if defined (__stub_shl_load) || defined (__stub___shl_load)
9305+choke me
9306+#else
9307+shl_load();
9308+#endif
9309+
9310+; return 0; }
9311+EOF
9312+if { (eval echo $progname:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9313+ rm -rf conftest*
9314+ eval "ac_cv_func_shl_load=yes"
9315+else
9316+ echo "$progname: failed program was:" >&5
9317+ cat conftest.$ac_ext >&5
9318+ rm -rf conftest*
9319+ eval "ac_cv_func_shl_load=no"
9320+fi
9321+rm -f conftest*
9322+fi
9323+
9324+if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
9325+ echo "$ac_t""yes" 1>&6
9326+ lt_cv_dlopen="shl_load"
9327+else
9328+ echo "$ac_t""no" 1>&6
9329+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
9330+echo "$progname:2333: checking for shl_load in -ldld" >&5
9331+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
9332+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9333+ echo $ac_n "(cached) $ac_c" 1>&6
9334+else
9335+ ac_save_LIBS="$LIBS"
9336+LIBS="-ldld $LIBS"
9337+cat > conftest.$ac_ext <<EOF
9338+#line 2341 "ltconfig"
9339+#include "confdefs.h"
9340+/* Override any gcc2 internal prototype to avoid an error. */
9341+/* We use char because int might match the return type of a gcc2
9342+ builtin and then its argument prototype would still apply. */
9343+char shl_load();
9344+
9345+int main() {
9346+shl_load()
9347+; return 0; }
9348+EOF
9349+if { (eval echo $progname:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9350+ rm -rf conftest*
9351+ eval "ac_cv_lib_$ac_lib_var=yes"
9352+else
9353+ echo "$progname: failed program was:" >&5
9354+ cat conftest.$ac_ext >&5
9355+ rm -rf conftest*
9356+ eval "ac_cv_lib_$ac_lib_var=no"
9357+fi
9358+rm -f conftest*
9359+LIBS="$ac_save_LIBS"
9360+
9361+fi
9362+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9363+ echo "$ac_t""yes" 1>&6
9364+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
9365+else
9366+ echo "$ac_t""no" 1>&6
9367+fi
9368+
9369+
9370+fi
9371+
9372+
9373+fi
9374+
9375+
9376+fi
9377+
9378+
9379+fi
9380+
9381+fi
9382+
9383+ if test "x$lt_cv_dlopen" != xno; then
9384+ enable_dlopen=yes
9385+ fi
9386+
9387+ case "$lt_cv_dlopen" in
9388+ dlopen)
9389+for ac_hdr in dlfcn.h; do
9390+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9391+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9392+echo "$progname:2395: checking for $ac_hdr" >&5
9393+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9394+ echo $ac_n "(cached) $ac_c" 1>&6
9395+else
9396+ cat > conftest.$ac_ext <<EOF
9397+#line 2400 "ltconfig"
9398+#include <$ac_hdr>
9399+int fnord = 0;
9400+EOF
9401+ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out"
9402+{ (eval echo $progname:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9403+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9404+if test -z "$ac_err"; then
9405+ rm -rf conftest*
9406+ eval "ac_cv_header_$ac_safe=yes"
9407+else
9408+ echo "$ac_err" >&5
9409+ echo "$progname: failed program was:" >&5
9410+ cat conftest.$ac_ext >&5
9411+ rm -rf conftest*
9412+ eval "ac_cv_header_$ac_safe=no"
9413+fi
9414+rm -f conftest*
9415+fi
9416+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9417+ echo "$ac_t""yes" 1>&6
9418+else
9419+ echo "$ac_t""no" 1>&6
9420+fi
9421+done
9422+
9423+ if test "x$ac_cv_header_dlfcn_h" = xyes; then
9424+ CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9425+ fi
9426+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9427+ LIBS="$lt_cv_dlopen_libs $LIBS"
9428+
9429+ echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
9430+echo "$progname:2433: checking whether a program can dlopen itself" >&5
9431+if test "${lt_cv_dlopen_self+set}" = set; then
9432+ echo $ac_n "(cached) $ac_c" 1>&6
9433+else
9434+ if test "$cross_compiling" = yes; then
9435+ lt_cv_dlopen_self=cross
9436+ else
9437+ cat > conftest.c <<EOF
9438+#line 2441 "ltconfig"
9439+
9440+#if HAVE_DLFCN_H
9441+#include <dlfcn.h>
9442+#endif
9443+
9444+#include <stdio.h>
9445+
9446+#ifdef RTLD_GLOBAL
9447+# define LTDL_GLOBAL RTLD_GLOBAL
9448+#else
9449+# ifdef DL_GLOBAL
9450+# define LTDL_GLOBAL DL_GLOBAL
9451+# else
9452+# define LTDL_GLOBAL 0
9453+# endif
9454+#endif
9455+
9456+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
9457+ find out it does not work in some platform. */
9458+#ifndef LTDL_LAZY_OR_NOW
9459+# ifdef RTLD_LAZY
9460+# define LTDL_LAZY_OR_NOW RTLD_LAZY
9461+# else
9462+# ifdef DL_LAZY
9463+# define LTDL_LAZY_OR_NOW DL_LAZY
9464+# else
9465+# ifdef RTLD_NOW
9466+# define LTDL_LAZY_OR_NOW RTLD_NOW
9467+# else
9468+# ifdef DL_NOW
9469+# define LTDL_LAZY_OR_NOW DL_NOW
9470+# else
9471+# define LTDL_LAZY_OR_NOW 0
9472+# endif
9473+# endif
9474+# endif
9475+# endif
9476+#endif
9477+
9478+fnord() { int i=42;}
9479+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
9480+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
9481+ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
9482+
9483+EOF
9484+if { (eval echo $progname:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
9485+then
9486+ lt_cv_dlopen_self=yes
9487+else
9488+ echo "$progname: failed program was:" >&5
9489+ cat conftest.$ac_ext >&5
9490+ rm -fr conftest*
9491+ lt_cv_dlopen_self=no
9492+fi
9493+rm -fr conftest*
9494+fi
9495+
9496+fi
9497+
9498+echo "$ac_t""$lt_cv_dlopen_self" 1>&6
9499+
9500+ if test "$lt_cv_dlopen_self" = yes; then
9501+ LDFLAGS="$LDFLAGS $link_static_flag"
9502+ echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
9503+echo "$progname:2506: checking whether a statically linked program can dlopen itself" >&5
9504+if test "${lt_cv_dlopen_self_static+set}" = set; then
9505+ echo $ac_n "(cached) $ac_c" 1>&6
9506+else
9507+ if test "$cross_compiling" = yes; then
9508+ lt_cv_dlopen_self_static=cross
9509+ else
9510+ cat > conftest.c <<EOF
9511+#line 2514 "ltconfig"
9512+
9513+#if HAVE_DLFCN_H
9514+#include <dlfcn.h>
9515+#endif
9516+
9517+#include <stdio.h>
9518+
9519+#ifdef RTLD_GLOBAL
9520+# define LTDL_GLOBAL RTLD_GLOBAL
9521+#else
9522+# ifdef DL_GLOBAL
9523+# define LTDL_GLOBAL DL_GLOBAL
9524+# else
9525+# define LTDL_GLOBAL 0
9526+# endif
9527+#endif
9528+
9529+/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
9530+ find out it does not work in some platform. */
9531+#ifndef LTDL_LAZY_OR_NOW
9532+# ifdef RTLD_LAZY
9533+# define LTDL_LAZY_OR_NOW RTLD_LAZY
9534+# else
9535+# ifdef DL_LAZY
9536+# define LTDL_LAZY_OR_NOW DL_LAZY
9537+# else
9538+# ifdef RTLD_NOW
9539+# define LTDL_LAZY_OR_NOW RTLD_NOW
9540+# else
9541+# ifdef DL_NOW
9542+# define LTDL_LAZY_OR_NOW DL_NOW
9543+# else
9544+# define LTDL_LAZY_OR_NOW 0
9545+# endif
9546+# endif
9547+# endif
9548+# endif
9549+#endif
9550+
9551+fnord() { int i=42;}
9552+main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
9553+ if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
9554+ if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
9555+
9556+EOF
9557+if { (eval echo $progname:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
9558+then
9559+ lt_cv_dlopen_self_static=yes
9560+else
9561+ echo "$progname: failed program was:" >&5
9562+ cat conftest.$ac_ext >&5
9563+ rm -fr conftest*
9564+ lt_cv_dlopen_self_static=no
9565+fi
9566+rm -fr conftest*
9567+fi
9568+
9569+fi
9570+
9571+echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
9572+fi
9573+ ;;
9574+ esac
9575+
9576+ case "$lt_cv_dlopen_self" in
9577+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
9578+ *) enable_dlopen_self=unknown ;;
9579+ esac
9580+
9581+ case "$lt_cv_dlopen_self_static" in
9582+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
9583+ *) enable_dlopen_self_static=unknown ;;
9584+ esac
9585+fi
9586+
9587+# Copy echo and quote the copy, instead of the original, because it is
9588+# used later.
9589+ltecho="$echo"
9590+if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
9591+ ltecho="$CONFIG_SHELL \$0 --fallback-echo"
9592+fi
9593+LTSHELL="$SHELL"
9594+
9595+LTCONFIG_VERSION="$VERSION"
9596+
9597+# Only quote variables if we're using ltmain.sh.
9598+case "$ltmain" in
9599+*.sh)
9600+ # Now quote all the things that may contain metacharacters.
9601+ for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
9602+ old_LD old_LDFLAGS old_LIBS \
9603+ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
9604+ AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
9605+ reload_flag reload_cmds wl \
9606+ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
9607+ thread_safe_flag_spec whole_archive_flag_spec libname_spec \
9608+ library_names_spec soname_spec \
9609+ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
9610+ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
9611+ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
9612+ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
9613+ hardcode_libdir_flag_spec hardcode_libdir_separator \
9614+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
9615+ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
9616+
9617+ case "$var" in
9618+ reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
9619+ old_postinstall_cmds | old_postuninstall_cmds | \
9620+ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
9621+ postinstall_cmds | postuninstall_cmds | \
9622+ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
9623+ # Double-quote double-evaled strings.
9624+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
9625+ ;;
9626+ *)
9627+ eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
9628+ ;;
9629+ esac
9630+ done
9631+
9632+ case "$ltecho" in
9633+ *'\$0 --fallback-echo"')
9634+ ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
9635+ ;;
9636+ esac
9637+
9638+ trap "$rm \"$ofile\"; exit 1" 1 2 15
9639+ echo "creating $ofile"
9640+ $rm "$ofile"
9641+ cat <<EOF > "$ofile"
9642+#! $SHELL
9643+
9644+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
9645+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9646+# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
9647+#
9648+# Copyright (C) 1996-1999 Free Software Foundation, Inc.
9649+# Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9650+#
9651+# This program is free software; you can redistribute it and/or modify
9652+# it under the terms of the GNU General Public License as published by
9653+# the Free Software Foundation; either version 2 of the License, or
9654+# (at your option) any later version.
9655+#
9656+# This program is distributed in the hope that it will be useful, but
9657+# WITHOUT ANY WARRANTY; without even the implied warranty of
9658+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9659+# General Public License for more details.
9660+#
9661+# You should have received a copy of the GNU General Public License
9662+# along with this program; if not, write to the Free Software
9663+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9664+#
9665+# As a special exception to the GNU General Public License, if you
9666+# distribute this file as part of a program that contains a
9667+# configuration script generated by Autoconf, you may include it under
9668+# the same distribution terms that you use for the rest of that program.
9669+
9670+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
9671+Xsed="sed -e s/^X//"
9672+
9673+# The HP-UX ksh and POSIX shell print the target directory to stdout
9674+# if CDPATH is set.
9675+if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
9676+
9677+### BEGIN LIBTOOL CONFIG
9678+EOF
9679+ cfgfile="$ofile"
9680+ ;;
9681+
9682+*)
9683+ # Double-quote the variables that need it (for aesthetics).
9684+ for var in old_CC old_CFLAGS old_CPPFLAGS \
9685+ old_LD old_LDFLAGS old_LIBS \
9686+ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
9687+ eval "$var=\\\"\$var\\\""
9688+ done
9689+
9690+ # Just create a config file.
9691+ cfgfile="$ofile.cfg"
9692+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
9693+ echo "creating $cfgfile"
9694+ $rm "$cfgfile"
9695+ cat <<EOF > "$cfgfile"
9696+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
9697+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
9698+EOF
9699+ ;;
9700+esac
9701+
9702+cat <<EOF >> "$cfgfile"
9703+# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9704+#
9705+# CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
9706+# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
9707+# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
9708+# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
9709+# $0$ltconfig_args
9710+#
9711+# Compiler and other test output produced by $progname, useful for
9712+# debugging $progname, is in ./config.log if it exists.
9713+
9714+# The version of $progname that generated this script.
9715+LTCONFIG_VERSION=$LTCONFIG_VERSION
9716+
9717+# Shell to use when invoking shell scripts.
9718+SHELL=$LTSHELL
9719+
9720+# Whether or not to build shared libraries.
9721+build_libtool_libs=$enable_shared
9722+
9723+# Whether or not to build static libraries.
9724+build_old_libs=$enable_static
9725+
9726+# Whether or not to optimize for fast installation.
9727+fast_install=$enable_fast_install
9728+
9729+# The host system.
9730+host_alias=$host_alias
9731+host=$host
9732+
9733+# An echo program that does not interpret backslashes.
9734+echo=$ltecho
9735+
9736+# The archiver.
9737+AR=$AR
9738+
9739+# The default C compiler.
9740+CC=$CC
9741+
9742+# The linker used to build libraries.
9743+LD=$LD
9744+
9745+# Whether we need hard or soft links.
9746+LN_S=$LN_S
9747+
9748+# A BSD-compatible nm program.
9749+NM=$NM
9750+
9751+# Used on cygwin: DLL creation program.
9752+DLLTOOL="$DLLTOOL"
9753+
9754+# Used on cygwin: object dumper.
9755+OBJDUMP="$OBJDUMP"
9756+
9757+# Used on cygwin: assembler.
9758+AS="$AS"
9759+
9760+# The name of the directory that contains temporary libtool files.
9761+objdir=$objdir
9762+
9763+# How to create reloadable object files.
9764+reload_flag=$reload_flag
9765+reload_cmds=$reload_cmds
9766+
9767+# How to pass a linker flag through the compiler.
9768+wl=$wl
9769+
9770+# Object file suffix (normally "o").
9771+objext="$objext"
9772+
9773+# Old archive suffix (normally "a").
9774+libext="$libext"
9775+
9776+# Executable file suffix (normally "").
9777+exeext="$exeext"
9778+
9779+# Additional compiler flags for building library objects.
9780+pic_flag=$pic_flag
9781+
9782+# Does compiler simultaneously support -c and -o options?
9783+compiler_c_o=$compiler_c_o
9784+
9785+# Can we write directly to a .lo ?
9786+compiler_o_lo=$compiler_o_lo
9787+
9788+# Must we lock files when doing compilation ?
9789+need_locks=$need_locks
9790+
9791+# Do we need the lib prefix for modules?
9792+need_lib_prefix=$need_lib_prefix
9793+
9794+# Do we need a version for libraries?
9795+need_version=$need_version
9796+
9797+# Whether dlopen is supported.
9798+dlopen=$enable_dlopen
9799+
9800+# Whether dlopen of programs is supported.
9801+dlopen_self=$enable_dlopen_self
9802+
9803+# Whether dlopen of statically linked programs is supported.
9804+dlopen_self_static=$enable_dlopen_self_static
9805+
9806+# Compiler flag to prevent dynamic linking.
9807+link_static_flag=$link_static_flag
9808+
9809+# Compiler flag to turn off builtin functions.
9810+no_builtin_flag=$no_builtin_flag
9811+
9812+# Compiler flag to allow reflexive dlopens.
9813+export_dynamic_flag_spec=$export_dynamic_flag_spec
9814+
9815+# Compiler flag to generate shared objects directly from archives.
9816+whole_archive_flag_spec=$whole_archive_flag_spec
9817+
9818+# Compiler flag to generate thread-safe objects.
9819+thread_safe_flag_spec=$thread_safe_flag_spec
9820+
9821+# Library versioning type.
9822+version_type=$version_type
9823+
9824+# Format of library name prefix.
9825+libname_spec=$libname_spec
9826+
9827+# List of archive names. First name is the real one, the rest are links.
9828+# The last name is the one that the linker finds with -lNAME.
9829+library_names_spec=$library_names_spec
9830+
9831+# The coded name of the library, if different from the real name.
9832+soname_spec=$soname_spec
9833+
9834+# Commands used to build and install an old-style archive.
9835+RANLIB=$RANLIB
9836+old_archive_cmds=$old_archive_cmds
9837+old_postinstall_cmds=$old_postinstall_cmds
9838+old_postuninstall_cmds=$old_postuninstall_cmds
9839+
9840+# Create an old-style archive from a shared archive.
9841+old_archive_from_new_cmds=$old_archive_from_new_cmds
9842+
9843+# Commands used to build and install a shared archive.
9844+archive_cmds=$archive_cmds
9845+archive_expsym_cmds=$archive_expsym_cmds
9846+postinstall_cmds=$postinstall_cmds
9847+postuninstall_cmds=$postuninstall_cmds
9848+
9849+# Method to check whether dependent libraries are shared objects.
9850+deplibs_check_method=$deplibs_check_method
9851+
9852+# Command to use when deplibs_check_method == file_magic.
9853+file_magic_cmd=$file_magic_cmd
9854+
9855+# Flag that allows shared libraries with undefined symbols to be built.
9856+allow_undefined_flag=$allow_undefined_flag
9857+
9858+# Flag that forces no undefined symbols.
9859+no_undefined_flag=$no_undefined_flag
9860+
9861+# Commands used to finish a libtool library installation in a directory.
9862+finish_cmds=$finish_cmds
9863+
9864+# Same as above, but a single script fragment to be evaled but not shown.
9865+finish_eval=$finish_eval
9866+
9867+# Take the output of nm and produce a listing of raw symbols and C names.
9868+global_symbol_pipe=$global_symbol_pipe
9869+
9870+# Transform the output of nm in a proper C declaration
9871+global_symbol_to_cdecl=$global_symbol_to_cdecl
9872+
9873+# This is the shared library runtime path variable.
9874+runpath_var=$runpath_var
9875+
9876+# This is the shared library path variable.
9877+shlibpath_var=$shlibpath_var
9878+
9879+# Is shlibpath searched before the hard-coded library search path?
9880+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
9881+
9882+# How to hardcode a shared library path into an executable.
9883+hardcode_action=$hardcode_action
9884+
9885+# Flag to hardcode \$libdir into a binary during linking.
9886+# This must work even if \$libdir does not exist.
9887+hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
9888+
9889+# Whether we need a single -rpath flag with a separated argument.
9890+hardcode_libdir_separator=$hardcode_libdir_separator
9891+
9892+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
9893+# resulting binary.
9894+hardcode_direct=$hardcode_direct
9895+
9896+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
9897+# resulting binary.
9898+hardcode_minus_L=$hardcode_minus_L
9899+
9900+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
9901+# the resulting binary.
9902+hardcode_shlibpath_var=$hardcode_shlibpath_var
9903+
9904+# Compile-time system search path for libraries
9905+sys_lib_search_path_spec=$sys_lib_search_path_spec
9906+
9907+# Run-time system search path for libraries
9908+sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
9909+
9910+# Fix the shell variable \$srcfile for the compiler.
9911+fix_srcfile_path="$fix_srcfile_path"
9912+
9913+# Set to yes if exported symbols are required.
9914+always_export_symbols=$always_export_symbols
9915+
9916+# The commands to list exported symbols.
9917+export_symbols_cmds=$export_symbols_cmds
9918+
9919+# Symbols that should not be listed in the preloaded symbols.
9920+exclude_expsyms=$exclude_expsyms
9921+
9922+# Symbols that must always be exported.
9923+include_expsyms=$include_expsyms
9924+
9925+EOF
9926+
9927+case "$ltmain" in
9928+*.sh)
9929+ echo '### END LIBTOOL CONFIG' >> "$ofile"
9930+ echo >> "$ofile"
9931+ case "$host_os" in
9932+ aix3*)
9933+ cat <<\EOF >> "$ofile"
9934+
9935+# AIX sometimes has problems with the GCC collect2 program. For some
9936+# reason, if we set the COLLECT_NAMES environment variable, the problems
9937+# vanish in a puff of smoke.
9938+if test "${COLLECT_NAMES+set}" != set; then
9939+ COLLECT_NAMES=
9940+ export COLLECT_NAMES
9941+fi
9942+EOF
9943+ ;;
9944+ esac
9945+
9946+ # Append the ltmain.sh script.
9947+ sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
9948+
9949+ chmod +x "$ofile"
9950+ ;;
9951+
9952+*)
9953+ # Compile the libtool program.
9954+ echo "FIXME: would compile $ltmain"
9955+ ;;
9956+esac
9957+
9958+test -n "$cache_file" || exit 0
9959+
9960+# AC_CACHE_SAVE
9961+trap '' 1 2 15
9962+cat > confcache <<\EOF
9963+# This file is a shell script that caches the results of configure
9964+# tests run on this system so they can be shared between configure
9965+# scripts and configure runs. It is not useful on other systems.
9966+# If it contains results you don't want to keep, you may remove or edit it.
9967+#
9968+# By default, configure uses ./config.cache as the cache file,
9969+# creating it if it does not exist already. You can give configure
9970+# the --cache-file=FILE option to use a different cache file; that is
9971+# what configure does when it calls configure scripts in
9972+# subdirectories, so they share the cache.
9973+# Giving --cache-file=/dev/null disables caching, for debugging configure.
9974+# config.status only pays attention to the cache file if you give it the
9975+# --recheck option to rerun configure.
9976+#
9977+EOF
9978+# The following way of writing the cache mishandles newlines in values,
9979+# but we know of no workaround that is simple, portable, and efficient.
9980+# So, don't put newlines in cache variables' values.
9981+# Ultrix sh set writes to stderr and can't be redirected directly,
9982+# and sets the high bit in the cache file unless we assign to the vars.
9983+(set) 2>&1 |
9984+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
9985+ *ac_space=\ *)
9986+ # `set' does not quote correctly, so add quotes (double-quote substitution
9987+ # turns \\\\ into \\, and sed turns \\ into \).
9988+ sed -n \
9989+ -e "s/'/'\\\\''/g" \
9990+ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9991+ ;;
9992+ *)
9993+ # `set' quotes correctly as required by POSIX, so do not add quotes.
9994+ sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9995+ ;;
9996+ esac >> confcache
9997+if cmp -s $cache_file confcache; then
9998+ :
9999+else
10000+ if test -w $cache_file; then
10001+ echo "updating cache $cache_file"
10002+ cat confcache > $cache_file
10003+ else
10004+ echo "not updating unwritable cache $cache_file"
10005+ fi
10006+fi
10007+rm -f confcache
10008+
10009+exit 0
10010+
10011+# Local Variables:
10012+# mode:shell-script
10013+# sh-indentation:2
10014+# End:
diff --git a/meta/packages/jpeg/jpeg-6b/libtool_tweak.patch b/meta/packages/jpeg/jpeg-6b/libtool_tweak.patch
new file mode 100644
index 0000000000..d61476adc0
--- /dev/null
+++ b/meta/packages/jpeg/jpeg-6b/libtool_tweak.patch
@@ -0,0 +1,52 @@
1Index: jpeg-6b/configure
2===================================================================
3--- jpeg-6b.orig/configure 2008-05-07 15:53:15.000000000 +0100
4+++ jpeg-6b/configure 2008-05-07 15:54:40.000000000 +0100
5@@ -1532,7 +1532,7 @@
6 LIBTOOL="./libtool"
7 O="lo"
8 A="la"
9- LN='$(LIBTOOL) --mode=link $(CC)'
10+ LN='$(LIBTOOL) --tag=CC --mode=link $(CC)'
11 INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
12 INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
13 else
14@@ -1559,7 +1559,6 @@
15 if test "x$LTSTATIC" = xno; then
16 disable_static="--disable-static"
17 fi
18- $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
19 fi
20
21 # Select memory manager depending on user input.
22Index: jpeg-6b/makefile.cfg
23===================================================================
24--- jpeg-6b.orig/makefile.cfg 2008-05-07 15:53:24.000000000 +0100
25+++ jpeg-6b/makefile.cfg 2008-05-07 15:56:22.000000000 +0100
26@@ -141,7 +141,7 @@
27
28 # How to compile with libtool.
29 @COM_LT@.c.lo:
30-@COM_LT@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
31+@COM_LT@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$*.c
32
33 # How to use ansi2knr, when not using libtool.
34 @COM_A2K@.c.o:
35@@ -152,7 +152,7 @@
36 # How to use ansi2knr AND libtool.
37 @COM_A2K@.c.lo:
38 @COM_A2K@ ./ansi2knr $(srcdir)/$*.c knr/$*.c
39-@COM_A2K@ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
40+@COM_A2K@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(CFLAGS) -c knr/$*.c
41 @COM_A2K@ $(RM) knr/$*.c
42
43 ansi2knr: ansi2knr.c
44@@ -169,7 +169,7 @@
45
46 # with libtool:
47 libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
48- $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
49+ $(LIBTOOL) --tag=CC --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
50 -rpath $(libdir) -version-info $(JPEG_LIB_VERSION) $(LDFLAGS)
51
52 # sample programs:
diff --git a/meta/packages/jpeg/jpeg_6b.bb b/meta/packages/jpeg/jpeg_6b.bb
index 978ae10be5..b930870bc6 100644
--- a/meta/packages/jpeg/jpeg_6b.bb
+++ b/meta/packages/jpeg/jpeg_6b.bb
@@ -5,12 +5,13 @@ PRIORITY = "required"
5 5
6DEPENDS = "libtool-cross" 6DEPENDS = "libtool-cross"
7 7
8PR = "r5" 8PR = "r6"
9 9
10SRC_URI = "http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \ 10SRC_URI = "http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \
11 file://debian.patch;patch=1 \ 11 file://debian.patch;patch=1 \
12 file://ldflags.patch;patch=1 \ 12 file://ldflags.patch;patch=1 \
13 file://paths.patch;patch=1" 13 file://paths.patch;patch=1 \
14 file://libtool_tweak.patch;patch=1"
14S = "${WORKDIR}/jpeg-${PV}" 15S = "${WORKDIR}/jpeg-${PV}"
15 16
16inherit autotools 17inherit autotools
@@ -20,6 +21,11 @@ EXTRA_OEMAKE='"LIBTOOL=${STAGING_BINDIR_NATIVE}/${HOST_SYS}-libtool"'
20 21
21CFLAGS_append = " -D_REENTRANT" 22CFLAGS_append = " -D_REENTRANT"
22 23
24do_configure_prepend () {
25 rm -f ${S}/ltconfig
26 rm -f ${S}/ltmain.sh
27}
28
23do_stage() { 29do_stage() {
24 install -m 644 jconfig.h ${STAGING_INCDIR}/jconfig.h 30 install -m 644 jconfig.h ${STAGING_INCDIR}/jconfig.h
25 install -m 644 jpeglib.h ${STAGING_INCDIR}/jpeglib.h 31 install -m 644 jpeglib.h ${STAGING_INCDIR}/jpeglib.h